mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
mv: return err if response is negative when moving a dir to existing dest during an interactive mode
This commit is contained in:
parent
a97199f72a
commit
1c8aac0883
2 changed files with 22 additions and 1 deletions
|
@ -260,6 +260,27 @@ fn test_mv_interactive_with_dir_as_target() {
|
|||
.no_stdout();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mv_interactive_dir_to_file_not_affirmative() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
let dir = "test_mv_interactive_dir_to_file_not_affirmative_dir";
|
||||
let file = "test_mv_interactive_dir_to_file_not_affirmative_file";
|
||||
|
||||
at.mkdir(dir);
|
||||
at.touch(file);
|
||||
|
||||
ucmd.arg(dir)
|
||||
.arg(file)
|
||||
.arg("-i")
|
||||
.pipe_in("n")
|
||||
.fails()
|
||||
.no_stderr()
|
||||
.no_stdout();
|
||||
|
||||
assert!(at.dir_exists(dir));
|
||||
}
|
||||
|
||||
#[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