]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak a recent test
authorTino Calancha <tino.calancha@gmail.com>
Wed, 10 May 2017 02:53:20 +0000 (11:53 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Wed, 10 May 2017 02:53:20 +0000 (11:53 +0900)
This test fails in my local machine because the data files
are compiled, and the test doesn't expect that.
* test/src/lread-tests.el (lread-test-bug26837): Match a suffix
ending with '.elc' when the data files are compiled.

test/src/lread-tests.el

index 0427fe64e4a111812cbf9ffb62a3993f82b3123c..80bc0c4a857cf97a985b0d2ee1bfbce32452e327 100644 (file)
@@ -147,12 +147,13 @@ literals (Bug#20852)."
   (let ((load-path (cons
                     (file-name-as-directory
                      (expand-file-name "data" (getenv "EMACS_TEST_DIRECTORY")))
-                    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)))))
+                    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))))
 
 ;;; lread-tests.el ends here