|
@@ -61,6 +61,28 @@
|
|
|
(should (string= "testing" (org-babel-lob-execute
|
|
|
(org-babel-lob-get-info))))))
|
|
|
|
|
|
+(ert-deftest test-ob-lob/export-lob-lines ()
|
|
|
+ "Test the export of a variety of library babel call lines."
|
|
|
+ (org-test-at-id "72ddeed3-2d17-4c7f-8192-a575d535d3fc"
|
|
|
+ (org-narrow-to-subtree)
|
|
|
+ (let ((html (org-export-as-html nil nil nil 'string 'body-only)))
|
|
|
+ ;; check the location of each exported number
|
|
|
+ (with-temp-buffer
|
|
|
+ (insert html) (goto-char (point-min))
|
|
|
+ ;; 0 should be on a line by itself
|
|
|
+ (should (re-search-forward "0" nil t))
|
|
|
+ (should (string= "0" (buffer-substring (point-at-bol) (point-at-eol))))
|
|
|
+ ;; 2 should be in <code> tags
|
|
|
+ (should (re-search-forward "2" nil t))
|
|
|
+ (should (re-search-forward (regexp-quote "</code>") (point-at-eol) t))
|
|
|
+ (should (re-search-backward (regexp-quote "<code>") (point-at-bol) t))
|
|
|
+ ;; 4 should not be exported
|
|
|
+ (should (not (re-search-forward "4" nil t)))
|
|
|
+ ;; 6 should also be inline
|
|
|
+ (should (re-search-forward "6" nil t))
|
|
|
+ (should (re-search-forward (regexp-quote "</code>") (point-at-eol) t))
|
|
|
+ (should (re-search-backward (regexp-quote "<code>") (point-at-bol) t))))))
|
|
|
+
|
|
|
(provide 'test-ob-lob)
|
|
|
|
|
|
;;; test-ob-lob.el ends here
|