2010-10-03 12:45:07 -04:00
|
|
|
|
;;; test-ob.el --- tests for ob.el
|
|
|
|
|
|
2010-10-04 10:06:16 -04:00
|
|
|
|
;; 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:
|
|
|
|
|
(require 'org-test)
|
2010-10-03 12:45:07 -04:00
|
|
|
|
|
|
|
|
|
(ert-deftest test-org-babel-get-src-block-info-language ()
|
2010-10-04 10:06:16 -04:00
|
|
|
|
(org-test-at-marker nil "94839181-184f-4ff4-a72f-94214df6f5ba"
|
2010-10-03 12:45:07 -04:00
|
|
|
|
(let ((info (org-babel-get-src-block-info)))
|
|
|
|
|
(should (string= "emacs-lisp" (nth 0 info))))))
|
|
|
|
|
|
|
|
|
|
(ert-deftest test-org-babel-get-src-block-info-body ()
|
2010-10-04 10:06:16 -04:00
|
|
|
|
(org-test-at-marker nil "94839181-184f-4ff4-a72f-94214df6f5ba"
|
2010-10-03 12:45:07 -04:00
|
|
|
|
(let ((info (org-babel-get-src-block-info)))
|
|
|
|
|
(should (string-match (regexp-quote "94839181-184f-4ff4-a72f-94214df6f5ba")
|
|
|
|
|
(nth 1 info))))))
|
|
|
|
|
|
|
|
|
|
(ert-deftest test-org-babel-get-src-block-info-tangle ()
|
2010-10-04 10:06:16 -04:00
|
|
|
|
(org-test-at-marker nil "94839181-184f-4ff4-a72f-94214df6f5ba"
|
2010-10-03 12:45:07 -04:00
|
|
|
|
(let ((info (org-babel-get-src-block-info)))
|
|
|
|
|
(should (string= "no" (cdr (assoc :tangle (nth 2 info))))))))
|
|
|
|
|
|
2010-10-04 10:06:16 -04:00
|
|
|
|
|
2010-10-03 12:45:07 -04:00
|
|
|
|
(provide 'test-ob)
|
|
|
|
|
|
|
|
|
|
;;; test-ob ends here
|