From: Juanma Barranquero <lekktu@gmail.com>
To: 21816@debbugs.gnu.org
Cc: stephen_leake@stephe-leake.org
Subject: bug#21816: elisp-mode-tests fails on a case-preserving filesystem
Date: Mon, 2 Nov 2015 17:41:58 +0100 [thread overview]
Message-ID: <CAAeL0SQLncO69=TuhRwWjh0OX5+HJnpcxwOccQLOu-hdO4uX+A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3340 bytes --]
Package: emacs
Version: 25.0.50
Severity: minor
X-Debbugs-CC: stephen_leake@stephe-leake.org
Test xref-elisp-test-find-defs-feature-el fails on my Windows system
because of a case-sensitive filename comparison.
Basically
ELISP> (aref (aref (car (elisp--xref-find-definitions 'xref)) 2) 3)
"c:/devel/emacs/repo/trunk/lisp/progmodes/xref.el"
ELISP> (aref (xref-make-elisp-location
'xref 'feature
(expand-file-name "../../lisp/progmodes/xref.el"
emacs-test-dir))
3)
"c:/Devel/emacs/repo/trunk/lisp/progmodes/xref.el"
and the test fails at the d/D in c:/Devel vs. c:/devel (as seen in the log
below).
The value returned by `expand-file-name' is the real name as stored in the
filesystem (the directory is called "Devel"). The value from
`elisp--xref-find-definitions' ultimately comes from `locate-file', and
reflects what's stored in `load-path' (which can be set by the user, so we
cannot force it to have "correct" casing).
ELISP> (locate-file "xref" load-path '(".el"))
"c:/devel/emacs/repo/trunk/lisp/progmodes/xref.el"
ELISP> (locate-file "xref" '("c:/Devel/emacs/repo/trunk/lisp/progmodes")
'(".el"))
"c:/Devel/emacs/repo/trunk/lisp/progmodes/xref.el"
The test code in elisp-mode-tests.el uses `equal' to compare the xref
structures. I can think a couple of ways to fix the test, but they are all
quite ugly....
Test xref-elisp-test-find-defs-feature-el backtrace:
(if (unwind-protect (setq value-107 (apply fn-105 args-106)) (setq f
(let (form-description-109) (if (unwind-protect (setq value-107 (app
(let ((value-107 (quote ert-form-evaluation-aborted-108))) (let (for
(let ((fn-105 (function equal)) (args-106 (list xref (or (if (consp
(let ((xref (car-safe (prog1 xrefs (setq xrefs (cdr xrefs))))) (expe
(while xrefs (let ((xref (car-safe (prog1 xrefs (setq xrefs (cdr xre
xref-elisp-test-run(([eieio-class-tag--xref-item #("(feature xref)"
(closure (cl-struct-xref-elisp-root-type-tags t) nil (xref-elisp-tes
ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
ert-run-test([cl-struct-ert-test xref-elisp-test-find-defs-feature-e
ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test e
ert-run-tests(t #[385 "\306 \307\"\203G \211\211G\310U\203 \211@\20
ert-run-tests-batch(nil)
ert-run-tests-batch-and-exit()
command-line-1(("-l" "ert" "-l" "elisp-mode-tests.el" "-f" "ert-run-
command-line()
normal-top-level()
Test xref-elisp-test-find-defs-feature-el condition:
(ert-test-failed
((should
(equal xref
(or ... expected)))
:form
(equal
[eieio-class-tag--xref-item
#("(feature xref)" 1 8 ... 9 13 ...)
[cl-struct-xref-elisp-location xref feature
"c:/devel/emacs/repo/trunk/lisp/progmodes/xref.el"]]
[eieio-class-tag--xref-item "(feature xref)"
[cl-struct-xref-elisp-location xref
feature "c:/Devel/emacs/repo/trunk/lisp/progmodes/xref.el"]])
:value nil :explanation
(array-elt 2
(array-elt 3
(array-elt 3 ...)))))
FAILED 34/35 xref-elisp-test-find-defs-feature-el
passed 35/35 xref-elisp-test-find-defs-feature-eval
Ran 35 tests, 34 results as expected, 1 unexpected (2015-11-02
17:11:45+0100)
1 unexpected results:
FAILED xref-elisp-test-find-defs-feature-el
[-- Attachment #2: Type: text/html, Size: 9834 bytes --]
next reply other threads:[~2015-11-02 16:41 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 16:41 Juanma Barranquero [this message]
2015-11-02 17:57 ` bug#21816: elisp-mode-tests fails on a case-preserving filesystem Eli Zaretskii
2015-11-02 18:20 ` Juanma Barranquero
2015-11-03 1:19 ` Juanma Barranquero
2015-11-03 3:42 ` Eli Zaretskii
2015-11-03 9:17 ` Stephen Leake
2015-11-03 10:06 ` Juanma Barranquero
2015-11-03 14:51 ` Stephen Leake
2015-11-03 14:58 ` Juanma Barranquero
2015-11-03 19:43 ` Stephen Leake
2015-11-03 22:24 ` Stephen Leake
2015-11-04 8:48 ` Juanma Barranquero
2015-11-09 3:38 ` Dmitry Gutov
2019-10-02 0:57 ` Juanma Barranquero
2015-11-03 15:40 ` Eli Zaretskii
2015-11-03 15:45 ` Juanma Barranquero
2015-11-03 15:52 ` Dmitry Gutov
2015-11-03 16:04 ` Juanma Barranquero
2015-11-03 16:18 ` Dmitry Gutov
2015-11-03 16:33 ` Juanma Barranquero
2015-11-03 18:12 ` Dmitry Gutov
2015-11-04 8:40 ` Juanma Barranquero
2015-11-03 16:34 ` Eli Zaretskii
2015-11-03 16:42 ` Juanma Barranquero
2015-11-03 16:53 ` Eli Zaretskii
2015-11-03 18:13 ` Dmitry Gutov
2015-11-03 19:54 ` Random832
2015-11-03 20:03 ` Dmitry Gutov
2015-11-03 20:25 ` Random832
2015-11-03 21:25 ` Dmitry Gutov
2015-11-03 20:51 ` Eli Zaretskii
2015-11-04 8:19 ` Juanma Barranquero
2015-11-03 18:18 ` Dmitry Gutov
2015-11-03 20:56 ` Eli Zaretskii
2015-11-04 8:53 ` Juanma Barranquero
2015-11-03 19:50 ` Random832
2015-11-03 21:02 ` Eli Zaretskii
2015-11-03 21:17 ` Random832
2015-11-03 21:22 ` Eli Zaretskii
2015-11-03 19:54 ` Stephen Leake
2015-11-03 20:05 ` Dmitry Gutov
2015-11-03 21:07 ` Eli Zaretskii
2015-11-03 21:52 ` Stephen Leake
2015-11-03 22:07 ` Stephen Leake
2015-11-03 22:18 ` Dmitry Gutov
2015-11-03 22:20 ` Stephen Leake
2015-11-04 3:46 ` Eli Zaretskii
2015-11-04 8:28 ` Stephen Leake
2015-11-04 5:24 ` Alexis
2015-11-04 6:33 ` Random832
2015-11-04 6:52 ` Alexis
2015-11-04 15:35 ` Eli Zaretskii
2015-11-04 15:38 ` Eli Zaretskii
2015-11-04 9:04 ` Stephen Leake
2015-11-04 10:37 ` Alexis
2015-11-04 16:08 ` Eli Zaretskii
2015-11-04 15:34 ` Eli Zaretskii
2015-11-03 21:05 ` Eli Zaretskii
2015-11-03 21:58 ` Stephen Leake
2015-11-04 3:42 ` Eli Zaretskii
2015-11-04 10:00 ` Stephen Leake
2015-11-04 19:14 ` Stephen Leake
2015-11-03 19:24 ` Stephen Leake
2015-11-03 21:00 ` Eli Zaretskii
2015-11-04 15:29 ` Stephen Leake
2015-11-05 12:26 ` Juanma Barranquero
2015-11-05 13:23 ` Stephen Leake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAeL0SQLncO69=TuhRwWjh0OX5+HJnpcxwOccQLOu-hdO4uX+A@mail.gmail.com' \
--to=lekktu@gmail.com \
--cc=21816@debbugs.gnu.org \
--cc=stephen_leake@stephe-leake.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).