1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

mv: support the case mkdir a && mv a e/

This commit is contained in:
Sylvestre Ledru 2024-01-03 23:43:02 +01:00
parent e341759dfe
commit 4c698d58e0
2 changed files with 16 additions and 2 deletions

View file

@ -1556,6 +1556,19 @@ fn test_mv_dir_into_file_where_both_are_files() {
.stderr_contains("mv: cannot stat 'a/': Not a directory");
}
#[test]
fn test_mv_dir_into_path_slash() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.mkdir("a");
scene.ucmd().arg("a").arg("e/").succeeds();
assert!(at.dir_exists("e"));
at.mkdir("b");
at.mkdir("f");
scene.ucmd().arg("b").arg("f/").succeeds();
assert!(at.dir_exists("f/b"));
}
// Todo:
// $ at.touch a b