mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 16:41:41 +02:00
Enable the use of multiple dots in FS Shell commands (#1547)
Every dot after `..` means another parent directory.
This commit is contained in:
committed by
GitHub
parent
c4daa2e40f
commit
d0618b0b32
@ -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());
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user