emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org fec15dedb9 5/6: test-ob-R.el: New function


From: ELPA Syncer
Subject: [elpa] externals-release/org fec15dedb9 5/6: test-ob-R.el: New function to test for :result output
Date: Wed, 14 Dec 2022 04:57:56 -0500 (EST)

branch: externals-release/org
commit fec15dedb942eacd0a7684de71d319f751fd74c5
Author: Jeremie Juste <djj@debian-BULLSEYE-live-builder-AMD64>
Commit: Ihor Radchenko <yantar92@posteo.net>

    test-ob-R.el: New function to test for :result output
    
    * test-ob-R.el (ob-session-R-result-output): This test will check if
    output is printed to buffer in a session with :results output. This
    test is to prevent the bug mentioned in 
https://list.orgmode.org/877czca7oj.fsf@u-bordeaux.fr/
    does not happen again.
---
 testing/lisp/test-ob-R.el | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/testing/lisp/test-ob-R.el b/testing/lisp/test-ob-R.el
index f6143b994b..da142fb3cf 100644
--- a/testing/lisp/test-ob-R.el
+++ b/testing/lisp/test-ob-R.el
@@ -246,8 +246,20 @@ log10(10)
                     (string= (concat src-block result)
                              (buffer-string)))))))
 
-
-
+; add test for :result output
+(ert-deftest ob-session-R-result-output ()
+  (let (ess-ask-for-ess-directory
+        ess-history-file
+        org-confirm-babel-evaluate
+        (org-babel-temporary-directory "/tmp")
+        (src-block "#+begin_src R :session R :results output \n  
1:3\n#+end_src")
+        (result "\n\n#+RESULTS:\n: [1] 1 2 3\n" ))
+    (org-test-with-temp-text
+     src-block
+     (should (progn (org-babel-execute-src-block)
+                    (sleep-for 0 200)
+                    (string= (concat src-block result)
+                             (buffer-string)))))))
 
 (provide 'test-ob-R)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]