]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix finding test .el files
authorGlenn Morris <rgm@gnu.org>
Wed, 10 May 2017 06:20:52 +0000 (23:20 -0700)
committerGlenn Morris <rgm@gnu.org>
Wed, 10 May 2017 06:20:52 +0000 (23:20 -0700)
* test/Makefile.in (ELFILES): Exclude the data/ directory.
* test/src/lread-tests.el (lread-test-bug26837): Revert previous.

test/Makefile.in
test/src/lread-tests.el

index 03ae32e3a62aa363159441ffe73d50fa0b76cfe7..4029bb2431e014eeccb89f56fbc5fd45c4527c36 100644 (file)
@@ -132,6 +132,7 @@ maybe_exclude_module_tests := -name emacs-module-tests.el -prune -o
 endif
 
 ELFILES := $(shell find ${srcdir} -path "${srcdir}/manual" -prune -o \
+               -path "${srcdir}/data" -prune -o \
                -name "*resources" -prune -o \
                ${maybe_exclude_module_tests} \
                -name "*.el" -print)
index 80bc0c4a857cf97a985b0d2ee1bfbce32452e327..0427fe64e4a111812cbf9ffb62a3993f82b3123c 100644 (file)
@@ -147,13 +147,12 @@ literals (Bug#20852)."
   (let ((load-path (cons
                     (file-name-as-directory
                      (expand-file-name "data" (getenv "EMACS_TEST_DIRECTORY")))
-                    load-path))
-        (fn (lambda (lib)
-              (load lib nil t)
-              (let ((str (caar load-history)))
-                (should (or (string-suffix-p (concat "/" lib ".el") str)
-                            (string-suffix-p (concat "/" lib ".elc") str)))))))
-    (dolist (lib '("somelib" "somelib2" "somelib"))
-      (funcall fn lib))))
+                    load-path)))
+    (load "somelib" nil t)
+    (should (string-suffix-p "/somelib.el" (caar load-history)))
+    (load "somelib2" nil t)
+    (should (string-suffix-p "/somelib2.el" (caar load-history)))
+    (load "somelib" nil t)
+    (should (string-suffix-p "/somelib.el" (caar load-history)))))
 
 ;;; lread-tests.el ends here