tests: cp: ensure cp rejects --link combined with --symbolic-link

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

* tests/cp/link.sh: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/412
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent e9de147d5a
commit 69a724b968
1 file changed
+6
+6
View File
@@ -28,4 +28,10 @@ touch dest2 || framework_failure_
cp -f --link src dest || fail=1
cp -f --symbolic-link src dest2 || fail=1
# --link and --symbolic-link are mutually exclusive.
returns_ 1 cp -s -l src new 2> err || fail=1
test -e new && fail=1
returns_ 1 cp --link --symbolic-link src new 2> err || fail=1
test -e new && fail=1
Exit $fail