tests: readlink: ensure the last of readlink's -e, -f and -m wins

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

* tests/readlink/can-e.sh: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/431
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent bb0ffe17f7
commit cedefc7896
1 file changed
+10
+10
View File
@@ -101,4 +101,14 @@ for p in "" "$pwd/$tmp/"; do
test -z "$v" || fail=1
done
# The last of -e, -f and -m wins.
readlink -e -f missing > out || fail=1
echo "$my_pwd/$tmp/missing" > exp || framework_failure_
compare exp out || fail=1
returns_ 1 readlink -f -e missing > out || fail=1
compare /dev/null out || fail=1
readlink -e -m missing/sub > out || fail=1
echo "$my_pwd/$tmp/missing/sub" > exp || framework_failure_
compare exp out || fail=1
Exit $fail