mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
mv: fix subdir detection
This commit is contained in:
parent
356023b055
commit
03f1b8aa3a
2 changed files with 22 additions and 22 deletions
|
@ -1455,6 +1455,20 @@ fn test_mv_directory_into_subdirectory_of_itself_fails() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mv_dir_into_dir_with_source_name_a_prefix_of_target_name() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let source = "test";
|
||||
let target = "test2";
|
||||
|
||||
at.mkdir(source);
|
||||
at.mkdir(target);
|
||||
|
||||
ucmd.arg(source).arg(target).succeeds().no_output();
|
||||
|
||||
assert!(at.dir_exists(&format!("{target}/{source}")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mv_file_into_dir_where_both_are_files() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue