aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/lisp/test-ob-R.el33
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/lisp/test-ob-R.el b/testing/lisp/test-ob-R.el
index f6143b994bf..b4a927f3972 100644
--- a/testing/lisp/test-ob-R.el
+++ b/testing/lisp/test-ob-R.el
@@ -248,6 +248,39 @@ log10(10)
248 248
249 249
250 250
251;; add test for results output
252(ert-deftest ob-session-R-results-output ()
253 (let (ess-ask-for-ess-directory
254 ess-history-file
255 org-confirm-babel-evaluate
256 (org-babel-temporary-directory "/tmp")
257 (src-block "#+begin_src R :session R :results output drawer\n 1:5\n#+end_src")
258 (result "\n\n#+RESULTS:\n:results:\n[1] 1 2 3 4 5\n:end:\n"))
259 (org-test-with-temp-text
260 src-block
261 (should (progn (org-babel-execute-src-block)
262 (sleep-for 0 200)
263 (string= (concat src-block result)
264 (buffer-string)))))))
265
266
267;; add test for result without drawer
268(ert-deftest ob-session-R-results-output-no-drawer ()
269 (let (ess-ask-for-ess-directory
270 ess-history-file
271 org-confirm-babel-evaluate
272 (org-babel-temporary-directory "/tmp")
273 (src-block "#+begin_src R :session R :results output \n 1:5\n#+end_src")
274 (result "\n\n#+RESULTS:\n: [1] 1 2 3 4 5\n"))
275 (org-test-with-temp-text
276 src-block
277 (should (progn (org-babel-execute-src-block)
278 (sleep-for 0 200)
279 (string= (concat src-block result)
280 (buffer-string)))))))
281
282
283
251 284
252(provide 'test-ob-R) 285(provide 'test-ob-R)
253 286