diff options
author | Glenn Morris <rgm@gnu.org> | 2013-11-04 21:54:38 -0500 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-11-04 21:54:38 -0500 |
commit | d511238048873be2947be33485072357ca3a7fe7 (patch) | |
tree | f5084d956e5804481d9d0b811c80a13aeb06a274 /test/automated/zlib-tests.el | |
parent | 194b4d9f7da7d539173b03d8a0ad434a86f6e124 (diff) |
Make it possible to run tests with a different working directory
* test/automated/flymake-tests.el (flymake-tests-data-directory): New.
(flymake-tests--current-face): Use flymake-tests-data-directory.
(warning-predicate-function-gcc, warning-predicate-rx-perl)
(warning-predicate-function-perl): Adapt for above change.
* test/automated/zlib-tests.el (zlib-tests-data-directory): New.
(zlib--decompress): Use zlib-tests-data-directory.
Diffstat (limited to 'test/automated/zlib-tests.el')
-rw-r--r-- | test/automated/zlib-tests.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/automated/zlib-tests.el b/test/automated/zlib-tests.el index d03d4c981b..57823a2e2d 100644 --- a/test/automated/zlib-tests.el +++ b/test/automated/zlib-tests.el @@ -23,6 +23,10 @@ (require 'ert) +(defvar zlib-tests-data-directory + (expand-file-name "data/decompress" (getenv "EMACS_TEST_DIRECTORY")) + "Directory containing zlib test data.") + (ert-deftest zlib--decompress () "Test decompressing a gzipped file." (when (and (fboundp 'zlib-available-p) @@ -30,7 +34,8 @@ (should (string= (with-temp-buffer (set-buffer-multibyte nil) - (insert-file-contents-literally "data/decompress/foo-gzipped") + (insert-file-contents-literally + (expand-file-name "foo-gzipped" zlib-tests-data-directory)) (zlib-decompress-region (point-min) (point-max)) (buffer-string)) "foo\n")))) |