Fix problem of image-tests.el on emba
* test/README: Mention $EMACS_TEST_DIRECTORY. * test/lisp/image-tests.el (image-tests--emacs-images-directory): Use `data-directory', for runs w/o of make. (image-type/from-filename): Check for `image-load-path'.
This commit is contained in:
parent
6c60ecd2d6
commit
c209a0f828
2 changed files with 8 additions and 2 deletions
|
@ -22,7 +22,10 @@ following tags are recognized:
|
|||
* :unstable
|
||||
The test is under development. It shall run on demand only.
|
||||
|
||||
The Makefile in this directory supports the following targets:
|
||||
The Makefile sets the environment variable $EMACS_TEST_DIRECTORY,
|
||||
which points to this directory. This environment variable does not
|
||||
exist when the tests are run outside make. The Makefile supports the
|
||||
following targets:
|
||||
|
||||
* make check
|
||||
Run all tests as defined in the directory. Expensive and unstable
|
||||
|
@ -113,6 +116,7 @@ Some optional tests require packages from GNU ELPA. By default
|
|||
out somewhere else, use
|
||||
|
||||
make GNU_ELPA_DIRECTORY=/path/to/elpa ...
|
||||
|
||||
|
||||
There are also continuous integration tests on
|
||||
<https://hydra.nixos.org/jobset/gnu/emacs-trunk> (see
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
(require 'cl-lib))
|
||||
|
||||
(defconst image-tests--emacs-images-directory
|
||||
(expand-file-name "../etc/images" (getenv "EMACS_TEST_DIRECTORY"))
|
||||
(expand-file-name "images" data-directory)
|
||||
"Directory containing Emacs images.")
|
||||
|
||||
(ert-deftest image--set-property ()
|
||||
|
@ -57,6 +57,8 @@
|
|||
(should (eq (image-type-from-file-name "foo.png") 'png)))
|
||||
|
||||
(ert-deftest image-type/from-filename ()
|
||||
;; On emba, `image-load-path' does not exist.
|
||||
(skip-unless (bound-and-true-p image-load-path))
|
||||
(should (eq (image-type "foo.jpg") 'jpeg)))
|
||||
|
||||
(ert-deftest image-type-from-file-header-test ()
|
||||
|
|
Loading…
Add table
Reference in a new issue