* bug#27880: 25.2; elisp-mode-tests may downcase too aggressively
@ 2017-07-30 16:21 Rob Browning
2017-07-30 20:41 ` npostavs
0 siblings, 1 reply; 3+ messages in thread
From: Rob Browning @ 2017-07-30 16:21 UTC (permalink / raw)
To: 27880
[Refiling as a bug report from a list thread.]
It looks like (in 25.2, and perhaps master too) elisp-mode-tests.el
downcases the xref path (location) for comparison in
xref-elisp-test-run, but that seems to also affect the filesystem lookup
lower down (in xref--goto-location) such that a handful of tests fail if
the build path contains uppercase characters. i.e. it tries to read the
downcased path, which of course (on ext4) doesn't exist.
In any case, I've hacked up a temporary fix by keeping the original as
"real-xref" and cloning that (and copying the location) to produce the
xref used by the modification and comparison.
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#27880: 25.2; elisp-mode-tests may downcase too aggressively
2017-07-30 16:21 bug#27880: 25.2; elisp-mode-tests may downcase too aggressively Rob Browning
@ 2017-07-30 20:41 ` npostavs
2017-07-30 23:17 ` Rob Browning
0 siblings, 1 reply; 3+ messages in thread
From: npostavs @ 2017-07-30 20:41 UTC (permalink / raw)
To: Rob Browning; +Cc: 27880
merge 27880 25534
quit
Rob Browning <rlb@defaultvalue.org> writes:
> [Refiling as a bug report from a list thread.]
>
> It looks like (in 25.2, and perhaps master too) elisp-mode-tests.el
> downcases the xref path (location) for comparison in
> xref-elisp-test-run, but that seems to also affect the filesystem lookup
> lower down (in xref--goto-location) such that a handful of tests fail if
> the build path contains uppercase characters. i.e. it tries to read the
> downcased path, which of course (on ext4) doesn't exist.
>
> In any case, I've hacked up a temporary fix by keeping the original as
> "real-xref" and cloning that (and copying the location) to produce the
> xref used by the modification and comparison.
>
> Thanks
This is the same as Bug#25534 "xref ERT tests fail when the source path
is mixed case", right?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#27880: 25.2; elisp-mode-tests may downcase too aggressively
2017-07-30 20:41 ` npostavs
@ 2017-07-30 23:17 ` Rob Browning
0 siblings, 0 replies; 3+ messages in thread
From: Rob Browning @ 2017-07-30 23:17 UTC (permalink / raw)
To: npostavs; +Cc: 27880
npostavs@users.sourceforge.net writes:
> This is the same as Bug#25534 "xref ERT tests fail when the source path
> is mixed case", right?
Looks likely. And at least for Debian, something like this fixes it:
+++ b/test/automated/elisp-mode-tests.el
@@ -179,11 +179,15 @@ xref-elisp-test-descr-to-target
(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))))
+ (setf (oref xref location)
+ (copy-xref-elisp-location (oref xref location)))
+
;; Downcase the filenames for case-insensitive file systems.
(setf (xref-elisp-location-file (oref xref location))
(downcase (xref-elisp-location-file (oref xref location))))
@@ -193,7 +197,7 @@ xref-elisp-test-run
(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)))))
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-30 23:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-30 16:21 bug#27880: 25.2; elisp-mode-tests may downcase too aggressively Rob Browning
2017-07-30 20:41 ` npostavs
2017-07-30 23:17 ` Rob Browning
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).