mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
tests/mv: test interactive mvError
test -i flag in case of overwriting a non-directory with a directory
This commit is contained in:
parent
1d76c96570
commit
76a74c65ab
1 changed files with 13 additions and 0 deletions
|
@ -748,6 +748,19 @@ fn test_mv_errors() {
|
||||||
.fails()
|
.fails()
|
||||||
.stderr_str()
|
.stderr_str()
|
||||||
.is_empty());
|
.is_empty());
|
||||||
|
|
||||||
|
// $ at.mkdir dir && at.touch file
|
||||||
|
// $ mv -i dir file
|
||||||
|
// err == mv: cannot overwrite non-directory 'file' with directory 'dir'
|
||||||
|
assert!(!scene
|
||||||
|
.ucmd()
|
||||||
|
.arg("-i")
|
||||||
|
.arg(dir)
|
||||||
|
.arg(file_a)
|
||||||
|
.pipe_in("y")
|
||||||
|
.fails()
|
||||||
|
.stderr_str()
|
||||||
|
.is_empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue