1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

cp: fix cp-i GNU test

`cp` in interactive mode used to write to stdout asking for
overwrite. GNU version writes to stderr.

Changed: write to stderr to make compatible with GNU.
This commit is contained in:
Niyaz Nigmatullin 2022-09-17 19:15:52 +03:00
parent 2cddce26d3
commit 2ce999c959
2 changed files with 6 additions and 4 deletions

View file

@ -204,6 +204,8 @@ fn test_cp_arg_interactive() {
.arg("-i")
.pipe_in("N\n")
.succeeds()
.no_stdout()
.stderr_contains(format!("overwrite '{}'?", TEST_HOW_ARE_YOU_SOURCE))
.stderr_contains("Not overwriting");
}