From 48e6e9a939cd0442497ee2e7b317d94ff9103cfb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 9 May 2017 23:20:52 -0700 Subject: [PATCH] Fix finding test .el files * test/Makefile.in (ELFILES): Exclude the data/ directory. * test/src/lread-tests.el (lread-test-bug26837): Revert previous. --- test/Makefile.in | 1 + test/src/lread-tests.el | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/Makefile.in b/test/Makefile.in index 03ae32e3a62..4029bb2431e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -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) diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 80bc0c4a857..0427fe64e4a 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el @@ -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 -- 2.11.4.GIT