test-ob-lob.el 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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-marker
  23. (expand-file-name "babel.org" org-test-example-dir)
  24. "69fbe856-ca9c-4f20-9146-826d2f488c1d"
  25. (move-beginning-of-line 1)
  26. (forward-line 1)
  27. (should (string= "testing" (org-babel-lob-execute
  28. (org-babel-lob-get-info))))
  29. (forward-line 1)
  30. (should (string= "testing" (caar (org-babel-lob-execute
  31. (org-babel-lob-get-info)))))
  32. (forward-line 1)
  33. (should (string= "testing" (org-babel-lob-execute
  34. (org-babel-lob-get-info))))
  35. (forward-line 1)
  36. (should (string= "testing" (caar (org-babel-lob-execute
  37. (org-babel-lob-get-info)))))))
  38. (provide 'test-ob-lob)
  39. ;;; test-ob-lob.el ends here