From: Stephen Berman Date: Fri, 16 Oct 2020 08:33:19 +0000 (+0200) Subject: Adjust some tests so that they work in symlinked environs X-Git-Tag: emacs-28.0.90~5609 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7543d5f173bf8da58a5553510e330456b479d24c;p=emacs.git Adjust some tests so that they work in symlinked environs * test/lisp/help-fns-tests.el (help-fns-test-lisp-macro) (help-fns-test-lisp-defsubst): * test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-tests--method-files--finds-methods): Adjust test so that they work in a symlinked environment (bug#43004). (cl-generic-tests--method-files--finds-methods): Use file-truename so that this works in a symlinked environment (bug#43004). --- diff --git a/test/lisp/emacs-lisp/cl-generic-tests.el b/test/lisp/emacs-lisp/cl-generic-tests.el index 5aa58782f36..9582907e511 100644 --- a/test/lisp/emacs-lisp/cl-generic-tests.el +++ b/test/lisp/emacs-lisp/cl-generic-tests.el @@ -240,7 +240,7 @@ (let ((retval (cl--generic-method-files 'cl-generic-tests--generic))) (should (equal (length retval) 2)) (mapc (lambda (x) - (should (equal (car x) cl-generic-tests--this-file)) + (should (equal (file-truename (car x)) cl-generic-tests--this-file)) (should (equal (cadr x) 'cl-generic-tests--generic))) retval) (should-not (equal (nth 0 retval) (nth 1 retval))))) diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el index 811b3677910..bdd488de3f2 100644 --- a/test/lisp/help-fns-tests.el +++ b/test/lisp/help-fns-tests.el @@ -56,28 +56,28 @@ Return first line of the output of (describe-function-1 FUNC)." (should (string-match regexp result)))) (ert-deftest help-fns-test-lisp-macro () - (let ((regexp "a Lisp macro in .subr\\.el") + (let ((regexp "a Lisp macro in .+subr\\.el") (result (help-fns-tests--describe-function 'when))) (should (string-match regexp result)))) (ert-deftest help-fns-test-lisp-defun () - (let ((regexp "a compiled Lisp function in .subr\\.el") + (let ((regexp "a compiled Lisp function in .+subr\\.el") (result (help-fns-tests--describe-function 'last))) (should (string-match regexp result)))) (ert-deftest help-fns-test-lisp-defsubst () - (let ((regexp "a compiled Lisp function in .subr\\.el") + (let ((regexp "a compiled Lisp function in .+subr\\.el") (result (help-fns-tests--describe-function 'posn-window))) (should (string-match regexp result)))) (ert-deftest help-fns-test-alias-to-defun () - (let ((regexp "an alias for .set-file-modes. in .subr\\.el") + (let ((regexp "an alias for .set-file-modes. in .+subr\\.el") (result (help-fns-tests--describe-function 'chmod))) (should (string-match regexp result)))) (ert-deftest help-fns-test-bug23887 () "Test for https://debbugs.gnu.org/23887 ." - (let ((regexp "an alias for .re-search-forward. in .subr\\.el") + (let ((regexp "an alias for .re-search-forward. in .+subr\\.el") (result (help-fns-tests--describe-function 'search-forward-regexp))) (should (string-match regexp result))))