2010-10-15 20:42:26 -04:00
|
|
|
|
;;; test-ob-lob.el
|
|
|
|
|
|
|
|
|
|
;; Copyright (c) 2010 Eric Schulte
|
|
|
|
|
;; Authors: Eric Schulte
|
|
|
|
|
|
|
|
|
|
;; Released under the GNU General Public License version 3
|
|
|
|
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
|
|
|
|
|
|
;;;; Comments:
|
|
|
|
|
|
|
|
|
|
;; Template test file for Org-mode tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
(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))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Tests
|
|
|
|
|
(ert-deftest test-ob-lob/ingest ()
|
|
|
|
|
"Test the ingestion of an org-mode file."
|
|
|
|
|
(should (< 0 (org-babel-lob-ingest
|
|
|
|
|
(expand-file-name "babel.org" org-test-example-dir)))))
|
|
|
|
|
|
2010-10-16 12:02:57 -04:00
|
|
|
|
(ert-deftest test-ob-lob/call-with-header-arguments ()
|
|
|
|
|
"Test the evaluation of a library of babel #+call: line."
|
2010-11-23 11:39:26 -05:00
|
|
|
|
(org-test-at-id "fab7e291-fde6-45fc-bf6e-a485b8bca2f0"
|
2010-10-16 12:02:57 -04:00
|
|
|
|
(move-beginning-of-line 1)
|
2010-11-23 11:39:26 -05:00
|
|
|
|
(forward-line 6)
|
|
|
|
|
(message (buffer-substring (point-at-bol) (point-at-eol)))
|
2010-10-16 12:02:57 -04:00
|
|
|
|
(should (string= "testing" (org-babel-lob-execute
|
|
|
|
|
(org-babel-lob-get-info))))
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(should (string= "testing" (caar (org-babel-lob-execute
|
|
|
|
|
(org-babel-lob-get-info)))))
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(should (string= "testing" (org-babel-lob-execute
|
|
|
|
|
(org-babel-lob-get-info))))
|
2010-10-21 09:53:33 -04:00
|
|
|
|
(forward-line 1)
|
2011-06-25 17:41:13 -04:00
|
|
|
|
(should (string= "testing" (caar (org-babel-lob-execute
|
|
|
|
|
(org-babel-lob-get-info)))))
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(should (string= "testing" (org-babel-lob-execute
|
|
|
|
|
(org-babel-lob-get-info))))
|
|
|
|
|
(forward-line 1)
|
2010-10-21 09:53:33 -04:00
|
|
|
|
(should (string= "testing" (caar (org-babel-lob-execute
|
|
|
|
|
(org-babel-lob-get-info)))))))
|
2010-10-16 12:02:57 -04:00
|
|
|
|
|
2010-10-15 20:42:26 -04:00
|
|
|
|
(provide 'test-ob-lob)
|
|
|
|
|
|
|
|
|
|
;;; test-ob-lob.el ends here
|