1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37: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:
Ashe Leclerc 2022-04-10 19:11:52 +02:00 committed by Sylvestre Ledru
parent 1d76c96570
commit 76a74c65ab

View file

@ -748,6 +748,19 @@ fn test_mv_errors() {
.fails()
.stderr_str()
.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]