mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
mv: allow a single source with --target-directory
This commit is contained in:
parent
8891571e9a
commit
530d5f6dbf
2 changed files with 36 additions and 9 deletions
|
@ -641,6 +641,20 @@ fn test_mv_target_dir() {
|
|||
assert!(at.file_exists(&format!("{}/{}", dir, file_b)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mv_target_dir_single_source() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let dir = "test_mv_target_dir_single_source_dir";
|
||||
let file = "test_mv_target_dir_single_source_file";
|
||||
|
||||
at.touch(file);
|
||||
at.mkdir(dir);
|
||||
ucmd.arg("-t").arg(dir).arg(file).succeeds().no_stderr();
|
||||
|
||||
assert!(!at.file_exists(file));
|
||||
assert!(at.file_exists(&format!("{}/{}", dir, file)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mv_overwrite_dir() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue