all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Ruby tests
Date: Sun, 12 May 2019 15:20:40 +0200	[thread overview]
Message-ID: <87bm0795cn.fsf@Rainer.invalid> (raw)

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]


Ruby tests have been failing for quite some time, here's my fix.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-test-ob-ruby.el-fix-tests.patch --]
[-- Type: text/x-patch, Size: 2564 bytes --]

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.
---
 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


[-- Attachment #3: Type: text/plain, Size: 192 bytes --]



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

             reply	other threads:[~2019-05-12 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-12 13:20 Achim Gratz [this message]
2019-05-12 22:56 ` [PATCH] Ruby tests Nicolas Goaziou
2019-05-15 19:15   ` Achim Gratz
2019-05-16  9:00     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bm0795cn.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.