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

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

bug#21816: elisp-mode-tests fails on a case-preserving filesystem


From: Stephen Leake
Subject: bug#21816: elisp-mode-tests fails on a case-preserving filesystem
Date: Tue, 03 Nov 2015 08:51:29 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Juanma Barranquero <lekktu@gmail.com> writes:

> On Tue, Nov 3, 2015 at 10:17 AM, Stephen Leake <
> stephen_leake@stephe-leake.org> wrote:
>
>> Well, since this is only a problem in a test run by developers (not
>> general users), we _could_ insist on that, but I agree it would be nice
>> not to.
>
> I think it points to a problem with xrefs in general. IMO xref-location
> should have a generic compare function (specialized by default on
> xref-file-location) so two of them can be compared other than by `equal'
> and get the right result in case-insensitive systems. And xref-item should
> also have a generic compare function, whose default implementation would
> use xref-compare-locations (or whatever the name) to compare its location
> slots.

What is the use case for these compares, other than tests?

>> The canonical solution for case-insensitive string comparisons is to use
>> `downcase' on both values before using `equal'. This works for me:
>
> It works for me too, though I get a whole bunch of warnings running the
> test:
>
> c:/devel/emacs/repo/trunk/test/automated/elisp-mode-tests.el and
> c:/Devel/emacs/repo/trunk/test/automated/elisp-mode-tests.el are the same
> file

Which is why I always put the right case in `load-path' :).

There's probably a way (other than fixing your load-path) to suppress
those warnings; ert can redirect errors in general. I did not look into
it.

More worrisome is this from the byte compiler:

In xref-elisp-test-run:
../../../master/test/automated/elisp-mode-tests.el:185:57:Warning: Unknown
    slot `:location'
../../../master/test/automated/elisp-mode-tests.el:189:60:Warning: Unknown
    slot `:location'

yet the code runs and the tests pass. Changing ":location" to "location"
fixes the warning.

There are also several "unused lexical arg" warnings; see the WORKAROUND
comment.

>> If no one objects to this, I'll commit it.
>
> Please do, thanks.

Done.

--
-- Stephe





reply via email to

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