Fix test failure in custom--test-theme-variables

* test/lisp/custom-tests.el (custom--test-theme-variables): "make
check" in the main directory didn't work because the path was
wrong.  Use EMACS_TEST_DIRECTORY to find the test directory
instead.
This commit is contained in:
Lars Ingebrigtsen 2020-09-07 18:19:40 +02:00
parent f681c097f2
commit 5312e56d43

View file

@ -101,7 +101,9 @@
"Test variables setting with enabling / disabling a custom theme."
;; We load custom-resources/custom--test-theme.el.
(let ((custom-theme-load-path
`(,(expand-file-name "custom-resources" (file-name-directory #$)))))
`(,(expand-file-name
"custom-resources"
(expand-file-name "lisp" (getenv "EMACS_TEST_DIRECTORY"))))))
(load-theme 'custom--test 'no-confirm 'no-enable)
;; The variables have still their initial values.
(should (equal custom--test-user-option 'foo))