From: Rob Browning Date: Sat, 29 Jul 2017 16:50:27 +0000 (-0500) Subject: Don't downcase real xref in elisp-mode-tests X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~119^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bb2b8069c63afbd738c2f559fe76d0fae1a50bc0;p=emacs.git Don't downcase real xref in elisp-mode-tests The elisp-mode-tests should no longer fail on case sensitive filesystems when the build path contains uppercase characters. Previously the code was downcasing the path for both comparison and lookups. --- diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index d2230583066..26eabac1066 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -312,7 +312,8 @@ (defun xref-elisp-test-run (xrefs expected-xrefs) (should (= (length xrefs) (length expected-xrefs))) (while xrefs - (let* ((xref (pop xrefs)) + (let* ((real-xref (pop xrefs)) + (xref (clone real-xref)) (expected (pop expected-xrefs)) (expected-xref (or (when (consp expected) (car expected)) expected)) (expected-source (when (consp expected) (cdr expected))) @@ -329,6 +330,9 @@ (file-truename (xref-elisp-location-file (xref-item-location expected-xref))))) + (setf (oref xref location) + (copy-xref-elisp-location (oref xref location))) + ;; Downcase the filenames for case-insensitive file systems. (when xref--case-insensitive (setf (xref-elisp-location-file (xref-item-location xref)) @@ -340,7 +344,7 @@ (should (equal xref expected-xref)) - (xref--goto-location (xref-item-location xref)) + (xref--goto-location (xref-item-location real-xref)) (back-to-indentation) (should (looking-at (or expected-source (xref-elisp-test-descr-to-target expected)))))