summaryrefslogtreecommitdiff
path: root/test/lisp/htmlfontify-tests.el
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2017-01-17 18:24:29 +0100
committerPhilipp Stephani <phst@google.com>2017-01-27 18:37:58 +0100
commit107a0c4caa649bad88cdbb67439f67ed8105e41a (patch)
tree64bd49b53d7e3b7ef61e7ad86eecf6a36cbabdcc /test/lisp/htmlfontify-tests.el
parent412b8dac5277092e677b3cd57b0fd1a36893a26b (diff)
downloademacs-107a0c4caa649bad88cdbb67439f67ed8105e41a.tar.gz
Don't require a shell when loading htmlfontify
* lisp/htmlfontify.el (hfy-which-etags): Don't call a shell for detecting the etags version (Bug#25468). * test/lisp/htmlfontify-tests.el (htmlfontify-bug25468): Add unit test.
Diffstat (limited to 'test/lisp/htmlfontify-tests.el')
-rw-r--r--test/lisp/htmlfontify-tests.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lisp/htmlfontify-tests.el b/test/lisp/htmlfontify-tests.el
index 15eb7c170c9..4a1d566e96c 100644
--- a/test/lisp/htmlfontify-tests.el
+++ b/test/lisp/htmlfontify-tests.el
@@ -30,5 +30,17 @@
(symbol-function
'htmlfontify-load-rgb-file))))
+(ert-deftest htmlfontify-bug25468 ()
+ "Tests that htmlfontify can be loaded even if no shell is
+available (Bug#25468)."
+ (should (equal (let ((process-environment
+ (cons "SHELL=/does/not/exist" process-environment)))
+ (call-process
+ (expand-file-name (invocation-name) (invocation-directory))
+ nil nil nil
+ "--quick" "--batch"
+ (concat "--load=" (locate-library "htmlfontify"))))
+ 0)))
+
(provide 'htmlfontify-tests)
;; htmlfontify-tests.el ends here