mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
cp: manages target with trailing '/'
This commit is contained in:
parent
cb27b9c9c3
commit
aabf5fa577
4 changed files with 40 additions and 4 deletions
|
@ -3681,3 +3681,23 @@ fn test_cp_seen_file() {
|
|||
assert!(at.plus("c").join("f").exists());
|
||||
assert!(at.plus("c").join("f.~1~").exists());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_path_ends_with_terminator() {
|
||||
let ts = TestScenario::new(util_name!());
|
||||
let at = &ts.fixtures;
|
||||
at.mkdir("a");
|
||||
ts.ucmd().arg("-r").arg("-T").arg("a").arg("e/").succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_no_such() {
|
||||
let ts = TestScenario::new(util_name!());
|
||||
let at = &ts.fixtures;
|
||||
at.touch("b");
|
||||
ts.ucmd()
|
||||
.arg("b")
|
||||
.arg("no-such/")
|
||||
.fails()
|
||||
.stderr_is("cp: 'no-such/' is not a directory\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue