test-ob-lob.el 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ;;; test-ob-lob.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. (let ((load-path (cons (expand-file-name
  10. ".." (file-name-directory
  11. (or load-file-name buffer-file-name)))
  12. load-path)))
  13. (require 'org-test)
  14. (require 'org-test-ob-consts))
  15. ;;; Tests
  16. (ert-deftest test-ob-lob/ingest ()
  17. "Test the ingestion of an org-mode file."
  18. (should (< 0 (org-babel-lob-ingest
  19. (expand-file-name "babel.org" org-test-example-dir)))))
  20. (ert-deftest test-ob-lob/call-with-header-arguments ()
  21. "Test the evaluation of a library of babel #+call: line."
  22. (org-test-at-id "fab7e291-fde6-45fc-bf6e-a485b8bca2f0"
  23. (move-beginning-of-line 1)
  24. (forward-line 6)
  25. (message (buffer-substring (point-at-bol) (point-at-eol)))
  26. (should (string= "testing" (org-babel-lob-execute
  27. (org-babel-lob-get-info))))
  28. (forward-line 1)
  29. (should (string= "testing" (caar (org-babel-lob-execute
  30. (org-babel-lob-get-info)))))
  31. (forward-line 1)
  32. (should (string= "testing" (org-babel-lob-execute
  33. (org-babel-lob-get-info))))
  34. (forward-line 1)
  35. (should (string= "testing" (caar (org-babel-lob-execute
  36. (org-babel-lob-get-info)))))))
  37. (provide 'test-ob-lob)
  38. ;;; test-ob-lob.el ends here