tests: realpath: ensure realpath -s -e fails on a dangling symlink

Reported at https://github.com/uutils/coreutils/issues/15996

* tests/misc/realpath.sh: Add test case.

Link: https://github.com/coreutils/coreutils/pull/432
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent cedefc7896
commit 566aeee281
1 file changed
+5
+5
View File
@@ -156,4 +156,9 @@ realpath -ms loop >out 2>err || fail=1
compare exp out || fail=1
compare /dev/null err || fail=1
# -e must check existence even when not resolving symlinks.
ln -s missing dangling || framework_failure_
returns_ 1 realpath --no-symlinks -e dangling > out 2> err || fail=1
compare /dev/null out || fail=1
Exit $fail