From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: [PATCH] Ruby tests Date: Sun, 12 May 2019 15:20:40 +0200 Message-ID: <87bm0795cn.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:49716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPoPN-00027n-06 for emacs-orgmode@gnu.org; Sun, 12 May 2019 09:20:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPoPL-0001wV-U4 for emacs-orgmode@gnu.org; Sun, 12 May 2019 09:20:52 -0400 Received: from [195.159.176.226] (port=38526 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPoPL-0001ug-MG for emacs-orgmode@gnu.org; Sun, 12 May 2019 09:20:51 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hPoPJ-0015hU-Ul for emacs-orgmode@gnu.org; Sun, 12 May 2019 15:20:49 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Ruby tests have been failing for quite some time, here's my fix. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-test-ob-ruby.el-fix-tests.patch >From 2f1bbaab939f6b6ceceb72862470e0576a8e2cba Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 12 May 2019 13:14:04 +0200 Subject: [PATCH 1/1] test-ob-ruby.el: fix tests * testing/lisp/test-ob-ruby.el: Output no longer contains a trailing newline, remove from the template to compare against. Session must be named for the tests to actually work, also add some extra code to ascertain that the code after the output statement has actually run in the session. --- testing/lisp/test-ob-ruby.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/testing/lisp/test-ob-ruby.el b/testing/lisp/test-ob-ruby.el index f42987b639..4d676fe19a 100644 --- a/testing/lisp/test-ob-ruby.el +++ b/testing/lisp/test-ob-ruby.el @@ -22,57 +22,58 @@ (signal 'missing-test-dependency "Support for Ruby code blocks")) (ert-deftest test-ob-ruby/session-output-1 () - (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output + (should (equal (org-test-with-temp-text "#+begin_src ruby :session org-test-ruby :results output s = \"1\" s = \"2\" s = \"3\" puts s +s = \"4\" #+end_src" (org-babel-execute-maybe) (substring-no-properties (buffer-string))) - "#+begin_src ruby :session :results output + "#+begin_src ruby :session org-test-ruby :results output s = \"1\" s = \"2\" s = \"3\" puts s +s = \"4\" #+end_src #+RESULTS: : 3 - "))) (ert-deftest test-ob-ruby/session-output-2 () - (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output -s = \"5\" + (should (equal (org-test-with-temp-text "#+begin_src ruby :session org-test-ruby :results output puts s +s = \"5\" #+end_src" (org-babel-execute-maybe) (substring-no-properties (buffer-string))) - "#+begin_src ruby :session :results output -s = \"5\" + "#+begin_src ruby :session org-test-ruby :results output puts s +s = \"5\" #+end_src #+RESULTS: -: 5 - +: 4 "))) (ert-deftest test-ob-ruby/session-output-3 () - (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output + (should (equal (org-test-with-temp-text "#+begin_src ruby :session org-test-ruby :results output puts s +s = \"6\" #+end_src" (org-babel-execute-maybe) (substring-no-properties (buffer-string))) - "#+begin_src ruby :session :results output + "#+begin_src ruby :session org-test-ruby :results output puts s +s = \"6\" #+end_src #+RESULTS: : 5 - "))) (provide 'test-ob-ruby) -- 2.21.0 --=-=-= Content-Type: text/plain Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada --=-=-=--