mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
mv: -i show no error if overwriting is declined
This commit is contained in:
parent
698bdf5f9a
commit
e94f1d8eb7
2 changed files with 38 additions and 16 deletions
|
@ -181,6 +181,26 @@ fn test_mv_interactive() {
|
|||
assert!(at.file_exists(file_b));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mv_interactive_with_dir_as_target() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
let file = "test_mv_interactive_file";
|
||||
let target_dir = "target";
|
||||
|
||||
at.mkdir(target_dir);
|
||||
at.touch(file);
|
||||
at.touch(format!("{target_dir}/{file}"));
|
||||
|
||||
ucmd.arg(file)
|
||||
.arg(target_dir)
|
||||
.arg("-i")
|
||||
.pipe_in("n")
|
||||
.fails()
|
||||
.stderr_does_not_contain("cannot move")
|
||||
.no_stdout();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mv_arg_update_interactive() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue