Enable the use of multiple dots in FS Shell commands (#1547)

Every dot after `..` means another parent directory.
This commit is contained in:
Kevin Del Castillo
2020-04-06 06:28:56 -05:00
committed by GitHub
parent c4daa2e40f
commit d0618b0b32
7 changed files with 256 additions and 56 deletions

View File

@ -45,3 +45,19 @@ fn creates_intermediary_directories() {
assert!(expected.exists());
})
}
#[test]
fn create_directory_two_parents_up_using_multiple_dots() {
Playground::setup("mkdir_test_4", |dirs, sandbox| {
sandbox.within("foo").mkdir("bar");
nu!(
cwd: dirs.test().join("foo/bar"),
"mkdir .../boo"
);
let expected = dirs.test().join("boo");
assert!(expected.exists());
})
}