test-ob.el 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ;;; test-ob.el --- tests for ob.el
  2. ;; Copyright (c) 2010 Eric Schulte
  3. ;; Authors: Eric Schulte
  4. ;; Released under the GNU General Public License version 3
  5. ;; see: http://www.gnu.org/licenses/gpl-3.0.html
  6. ;;;; Comments:
  7. ;; Template test file for Org-mode tests
  8. ;;; Code:
  9. (require 'org-test)
  10. (require 'org-test-ob-consts)
  11. (ert-deftest test-org-babel-get-src-block-info-language ()
  12. (org-test-at-marker nil org-test-file-ob-anchor
  13. (let ((info (org-babel-get-src-block-info)))
  14. (should (string= "emacs-lisp" (nth 0 info))))))
  15. (ert-deftest test-org-babel-get-src-block-info-body ()
  16. (org-test-at-marker nil org-test-file-ob-anchor
  17. (let ((info (org-babel-get-src-block-info)))
  18. (should (string-match (regexp-quote org-test-file-ob-anchor)
  19. (nth 1 info))))))
  20. (ert-deftest test-org-babel-get-src-block-info-tangle ()
  21. (org-test-at-marker nil org-test-file-ob-anchor
  22. (let ((info (org-babel-get-src-block-info)))
  23. (should (string= "no" (cdr (assoc :tangle (nth 2 info))))))))
  24. (provide 'test-ob)
  25. ;;; test-ob ends here