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

cp --no-clobber should fail

This commit is contained in:
Sylvestre Ledru 2023-05-31 23:53:21 +02:00
parent 0b4a91744d
commit 4eb1e847e9
2 changed files with 9 additions and 12 deletions

View file

@ -487,7 +487,7 @@ fn test_cp_arg_no_clobber() {
ucmd.arg(TEST_HELLO_WORLD_SOURCE)
.arg(TEST_HOW_ARE_YOU_SOURCE)
.arg("--no-clobber")
.succeeds();
.fails();
assert_eq!(at.read(TEST_HOW_ARE_YOU_SOURCE), "How are you?\n");
}
@ -498,7 +498,7 @@ fn test_cp_arg_no_clobber_inferred_arg() {
ucmd.arg(TEST_HELLO_WORLD_SOURCE)
.arg(TEST_HOW_ARE_YOU_SOURCE)
.arg("--no-clob")
.succeeds();
.fails();
assert_eq!(at.read(TEST_HOW_ARE_YOU_SOURCE), "How are you?\n");
}
@ -525,7 +525,7 @@ fn test_cp_arg_no_clobber_twice() {
.arg("--no-clobber")
.arg("source.txt")
.arg("dest.txt")
.succeeds();
.fails();
assert_eq!(at.read("source.txt"), "some-content");
// Should be empty as the "no-clobber" should keep