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

{cp, mv} -i --update source existing should not do anything and exit 0

Should fix tests/mv/update.sh
This commit is contained in:
Sylvestre Ledru 2022-10-24 20:01:15 +02:00
parent 418518a443
commit 6e8f8034ba
4 changed files with 43 additions and 0 deletions

View file

@ -184,6 +184,25 @@ fn test_mv_interactive() {
assert!(at.file_exists(file_b));
}
#[test]
fn test_mv_arg_update_interactive() {
let (at, mut ucmd) = at_and_ucmd!();
let file_a = "test_mv_replace_file_a";
let file_b = "test_mv_replace_file_b";
at.touch(file_a);
at.touch(file_b);
ucmd.arg(file_a)
.arg(file_b)
.arg("-i")
.arg("--update")
.succeeds()
.no_stdout()
.no_stderr();
}
#[test]
fn test_mv_no_clobber() {
let (at, mut ucmd) = at_and_ucmd!();