mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
install: support of -d dir/.
to match GNU's
This commit is contained in:
parent
97be8403d3
commit
2628f3ed60
2 changed files with 37 additions and 3 deletions
|
@ -1124,3 +1124,27 @@ fn test_install_missing_destination() {
|
|||
file_1
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_install_dir_dot() {
|
||||
// To match tests/install/d-slashdot.sh
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
||||
scene.ucmd().arg("-d").arg("dir1/.").succeeds();
|
||||
scene.ucmd().arg("-d").arg("dir2/..").succeeds();
|
||||
// Tests that we don't have dir3/. in the output
|
||||
// but only 'dir3'
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("-d")
|
||||
.arg("dir3/.")
|
||||
.arg("-v")
|
||||
.succeeds()
|
||||
.stdout_contains("creating directory 'dir3'");
|
||||
|
||||
let at = &scene.fixtures;
|
||||
|
||||
assert!(at.dir_exists("dir1"));
|
||||
assert!(at.dir_exists("dir2"));
|
||||
assert!(at.dir_exists("dir3"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue