Fix some failing tests
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-headers): (test-ob-exp/org-babel-exp-src-blocks/w-no-file): Fix test. These tests fail when "htmlize" is not available on the machine.
This commit is contained in:
parent
a65ddb0228
commit
8590c79b3a
|
@ -40,26 +40,26 @@ Current buffer is a copy of the original buffer."
|
||||||
|
|
||||||
(ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-headers ()
|
(ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-headers ()
|
||||||
"Testing export without any headlines in the Org mode file."
|
"Testing export without any headlines in the Org mode file."
|
||||||
(require 'ox-html)
|
(require 'ox-ascii)
|
||||||
(let ((html-file (concat (file-name-sans-extension org-test-no-heading-file)
|
(let ((text-file (concat (file-name-sans-extension org-test-no-heading-file)
|
||||||
".html")))
|
".txt")))
|
||||||
(when (file-exists-p html-file) (delete-file html-file))
|
(when (file-exists-p text-file) (delete-file text-file))
|
||||||
(org-test-in-example-file org-test-no-heading-file
|
(org-test-in-example-file org-test-no-heading-file
|
||||||
;; Export the file to HTML.
|
;; Export the file to HTML.
|
||||||
(org-export-to-file 'html html-file))
|
(org-export-to-file 'ascii text-file))
|
||||||
;; should create a .html file
|
;; should create a ".txt" file
|
||||||
(should (file-exists-p html-file))
|
(should (file-exists-p text-file))
|
||||||
;; should not create a file with "::" appended to its name
|
;; should not create a file with "::" appended to its name
|
||||||
(should-not (file-exists-p (concat org-test-no-heading-file "::")))
|
(should-not (file-exists-p (concat org-test-no-heading-file "::")))
|
||||||
(when (file-exists-p html-file) (delete-file html-file))))
|
(when (file-exists-p text-file) (delete-file text-file))))
|
||||||
|
|
||||||
(ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-file ()
|
(ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-file ()
|
||||||
"Testing export from buffers which are not visiting any file."
|
"Testing export from buffers which are not visiting any file."
|
||||||
(require 'ox-html)
|
(require 'ox-ascii)
|
||||||
(let ((name (generate-new-buffer-name "*Org HTML Export*")))
|
(let ((name (generate-new-buffer-name "*Org ASCII Export*")))
|
||||||
(org-test-in-example-file nil
|
(org-test-in-example-file nil
|
||||||
(org-export-to-buffer 'html name nil nil nil t))
|
(org-export-to-buffer 'ascii name nil nil nil t))
|
||||||
;; Should create a HTML buffer.
|
;; Should create a new buffer.
|
||||||
(should (buffer-live-p (get-buffer name)))
|
(should (buffer-live-p (get-buffer name)))
|
||||||
;; Should contain the content of the buffer.
|
;; Should contain the content of the buffer.
|
||||||
(with-current-buffer (get-buffer name)
|
(with-current-buffer (get-buffer name)
|
||||||
|
|
Loading…
Reference in New Issue