emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#21816: closed (elisp-mode-tests fails on a case-pr


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21816: closed (elisp-mode-tests fails on a case-preserving filesystem)
Date: Wed, 02 Oct 2019 00:59:01 +0000

Your message dated Wed, 2 Oct 2019 02:57:46 +0200
with message-id <address@hidden>
and subject line Re: bug#21816: elisp-mode-tests fails on a case-preserving 
filesystem
has caused the debbugs.gnu.org bug report #21816,
regarding elisp-mode-tests fails on a case-preserving filesystem
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
21816: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21816
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: elisp-mode-tests fails on a case-preserving filesystem Date: Mon, 2 Nov 2015 17:41:58 +0100
Package: emacs
Version: 25.0.50
Severity: minor
X-Debbugs-CC: address@hidden


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


--- End Message ---
--- Begin Message --- Subject: Re: bug#21816: elisp-mode-tests fails on a case-preserving filesystem Date: Wed, 2 Oct 2019 02:57:46 +0200
The tests pass, the bug was fixed long ago, and the rest is a very long discussion about generalizing comparison of xrefs and canonicalizing filenames.

I'm closing this one.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]