]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: cp: ensure --debug output failure is diagnosed
authoroech3 <79379754+oech3@users.noreply.github.com>
Thu, 12 Feb 2026 16:32:19 +0000 (16:32 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 12 Feb 2026 16:33:38 +0000 (16:33 +0000)
* tests/cp/debug.sh: cp diagnostics are written to stdout,
so ensure output errors are diagnosed.
https://github.com/coreutils/coreutils/pull/192

tests/cp/debug.sh

index 25ea639ecdaa4ba4bcd9440b5fe6b663a0d14315..deff053576ad2dbc879f5f9eafe7607839061221 100755 (executable)
@@ -29,4 +29,9 @@ touch file.cp || framework_failure_
 cp --debug --update=none file file.cp >cp.out || fail=1
 grep 'skipped' cp.out || fail=1
 
+if test -w /dev/full && test -c /dev/full; then
+  returns_ 1 cp file file.cp2 --debug >/dev/full || fail=1
+  test -e file.cp2 || fail=1
+fi
+
 Exit $fail