mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
mv: add test for "mv
fails transfers between dirs"
This commit is contained in:
parent
556a96406c
commit
31ca885c9c
1 changed files with 19 additions and 0 deletions
|
@ -44,6 +44,25 @@ fn test_mv_move_file_into_dir() {
|
||||||
assert!(at.file_exists(&format!("{}/{}", dir, file)));
|
assert!(at.file_exists(&format!("{}/{}", dir, file)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_mv_move_file_between_dirs() {
|
||||||
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
|
let dir1 = "test_mv_move_file_between_dirs_dir1";
|
||||||
|
let dir2 = "test_mv_move_file_between_dirs_dir2";
|
||||||
|
let file = "test_mv_move_file_between_dirs_file";
|
||||||
|
|
||||||
|
at.mkdir(dir1);
|
||||||
|
at.mkdir(dir2);
|
||||||
|
at.touch(&format!("{}/{}", dir1, file));
|
||||||
|
|
||||||
|
assert!(at.file_exists(&format!("{}/{}", dir1, file)));
|
||||||
|
|
||||||
|
ucmd.arg(&format!("{}/{}", dir1, file)).arg(dir2).succeeds().no_stderr();
|
||||||
|
|
||||||
|
assert!(!at.file_exists(&format!("{}/{}", dir1, file)));
|
||||||
|
assert!(at.file_exists(&format!("{}/{}", dir2, file)));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_mv_strip_slashes() {
|
fn test_mv_strip_slashes() {
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue