diff options
author | Achim Gratz <Stromeko@nexgo.de> | 2019-05-12 15:20:40 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-05-16 10:43:14 +0200 |
commit | be1d65b72fa4c0eb48c253b87f31334bbc52badf (patch) | |
tree | 6d65a964c842c2a9699dab83b6c19c6cb7f1b133 | |
parent | 4df705125512255dafb5a38721a883638ab019b5 (diff) | |
download | org-mode-be1d65b72fa4c0eb48c253b87f31334bbc52badf.tar.gz |
Ruby tests
Ruby tests have been failing for quite some time, here's my fix.
From 2f1bbaab939f6b6ceceb72862470e0576a8e2cba Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
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.
-rw-r--r-- | testing/lisp/test-ob-ruby.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/testing/lisp/test-ob-ruby.el b/testing/lisp/test-ob-ruby.el index f42987b..4d676fe 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) |