GNU bug report logs -
#42537
28.0.50; wdired-test-bug34915 test failing on macOS
Previous Next
Reported by: Philipp <p.stephani2 <at> gmail.com>
Date: Sat, 25 Jul 2020 18:47:01 UTC
Severity: normal
Tags: fixed
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Philipp <p.stephani2 <at> gmail.com> writes:
> :form
> (equal "bar@" "wbar@")
> :value nil :explanation
> (arrays-of-different-length 4 5 "bar@" "wbar@" first-mismatch-at 0)))
> FAILED 3/5 wdired-test-bug34915 (0.353864 sec)
>
> (Crystal ball says this might be related to macOS filename
> normalization/case-insensitivity.)
There's something very odd going on here.
If I create a file /tmp/bar and then say
(make-symbolic-link "bar" "foo")
I get, as expected
-rw-r--r-- 1 larsi wheel 0 Aug 4 14:09 bar
lrwxr-xr-x 1 larsi wheel 3 Aug 4 14:09 foo -> bar
However, if I do something similar in the test director, dired insists
on adding a "@" to the end of the file name, which messes up everything:
/var/folders/l6/0kf2px5j7tz_wbp9lf_hgfwm0000gn/T/test-dir-iRvcaN:
-rw-r--r-- 1 larsi staff 1 Aug 4 14:12 zot
lrwxr-xr-x 1 larsi staff 3 Aug 4 14:14 zotlink@ -> zot
Uhm... Oh, that's the entire point of the test. :-) "ls -F" adds the
"@".
So the error is a real bug, because
(dired-get-filename 'no-dir t)
=> "zotlink@"
And that's because dired-ls-F-marks-symlinks is nil...
;; 1. For dired to work on a host which marks symlinks with a trailing @ in
;; an ls -alF listing, you need to (setq dired-ls-F-marks-symlinks t).
;; Most UNIX systems do not do this, but ULTRIX does.
And Macos is another:
larsi <at> space /tmp % ls -alF /tmp/
total 0
drwxrwxrwt 8 root wheel 256 Aug 4 14:12 ./
drwxr-xr-x 6 root wheel 192 Aug 2 18:53 ../
-rw-r--r-- 1 larsi wheel 0 Aug 4 14:09 bar
lrwxr-xr-x 1 larsi wheel 3 Aug 4 14:09 foo@ -> bar
lrwxr-xr-x 1 larsi wheel 3 Aug 4 14:10 foo3@ -> bar
lrwxr-xr-x 1 larsi wheel 3 Aug 4 14:12 foo4@ -> bar
OK, I've now adjusted the test and fixed the doc string to
dired-ls-F-marks-symlinks in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.