Subject: bug#52430: 29.0.50; em-ls-tests failing on macOS

From: Philipp Stephani <[email-masked]>
Date: Tue, 28 Dec 2021 20:58:08 +0100

Am So., 12. Dez. 2021 um 07:00 Uhr schrieb Lars Ingebrigtsen <[email-masked]>:
>
> Philipp <[email-masked]> writes:
>
> > On my macOS Monterey machine, the em-ls-tests fail partially, both on
> > master and emacs-28.  Log follows:
> >
> > Running 4 tests (2021-12-11 14:23:53+0100, selector `(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))')
> >    passed  1/4  em-ls-test-bug27631 (0.107104 sec)
> >    passed  2/4  em-ls-test-bug27817 (0.014281 sec)
> >    passed  3/4  em-ls-test-bug27843 (0.000889 sec)
> > Test em-ls-test-bug27844 backtrace:
> >   signal(error ("No matches found: /Users/p/Entwicklung/emacs/maste...
>
> I'm unable to reproduce this on the trunk on my Monterey laptop (with
> Macports).  Could your system be using a different ls than mine or
> something?

Looks like the problem is that eshell-extended-glob doesn't correctly
case-fold filenames on macOS:
$ mkdir -p /tmp/foo
$ touch /tmp/foo/bar
$ emacs -Q -batch -l em-glob -eval '(print (eshell-extended-glob "/tmp/FOO/*"))'
"/tmp/FOO/*"

In my case, the realpath of the Emacs source directory is actually
~/Entwicklung/Emacs/master (note the capital E), but my filesystem is
case-insensitive (as is the default on macOS).