|
@@ -79,6 +79,22 @@ x
|
|
|
(should (equal '(("col") ("a") ("b"))
|
|
|
(org-babel-execute-src-block)))))
|
|
|
|
|
|
+(ert-deftest test-ob-R/results-file ()
|
|
|
+ (org-test-with-temp-text "#+NAME: TESTSRC
|
|
|
+#+BEGIN_SRC R :results file
|
|
|
+ a <- file.path(\"junk\", \"test.org\")
|
|
|
+ a
|
|
|
+#+END_SRC"
|
|
|
+ (goto-char (point-min)) (org-babel-execute-maybe)
|
|
|
+ (org-babel-goto-named-result "TESTSRC") (forward-line 1)
|
|
|
+ (should (string= "[[file:junk/test.org]]"
|
|
|
+ (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
|
|
|
+ (goto-char (point-min)) (forward-line 1)
|
|
|
+ (insert "#+header: :session\n")
|
|
|
+ (goto-char (point-min)) (org-babel-execute-maybe)
|
|
|
+ (org-babel-goto-named-result "TESTSRC") (forward-line 1)
|
|
|
+ (should (string= "[[file:junk/test.org]]"
|
|
|
+ (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
|
|
|
(provide 'test-ob-R)
|
|
|
|
|
|
;;; test-ob-R.el ends here
|