org-mode/testing/lisp/test-ob-R.el
Eric Schulte decd7227f6 only load those test files for which the required executables are present
* testing/org-test.el (org-exe-not-found): An error type used to
  signal a missing executable
  (org-test-for-executable): A function used by test files to throw an
  error if a required executable is not present.
  (org-test-load): Simply skip files for which the required
  executables are not present.

* testing/lisp/test-ob-R.el: Conditional loading.
* testing/lisp/test-ob-awk.el: Conditional loading.
* testing/lisp/test-ob-fortran.el: Conditional loading.
2011-09-21 16:41:44 -06:00

31 lines
767 B
EmacsLisp

;;; test-ob-R.el --- tests for ob-R.el
;; Copyright (c) 2011 Eric Schulte
;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html
(org-test-for-executable "R")
(unless (featurep 'ess)
(signal 'org-test-lib-not-found "ess"))
(let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(require 'ob-R)
(ert-deftest test-ob-R/simple-session ()
(org-test-with-temp-text
"#+begin_src R :session R\n paste(\"Yep!\")\n#+end_src\n"
(should (string= "Yep!" (org-babel-execute-src-block)))))
(provide 'test-ob-R)
;;; test-ob-R.el ends here