Correction bug multiple dots mkdir and touch (#8486)

This commit is contained in:
Thomas Coratger
2023-04-05 19:22:56 +02:00
committed by GitHub
parent 1134c2f16c
commit 01e5ba01f6
3 changed files with 84 additions and 2 deletions

View File

@ -84,3 +84,45 @@ fn print_created_paths() {
assert!(actual.err.contains("dir_3"));
})
}
#[test]
fn creates_directory_three_dots() {
Playground::setup("mkdir_test_1", |dirs, _| {
nu!(
cwd: dirs.test(),
"mkdir test..."
);
let expected = dirs.test().join("test...");
assert!(expected.exists());
})
}
#[test]
fn creates_directory_four_dots() {
Playground::setup("mkdir_test_1", |dirs, _| {
nu!(
cwd: dirs.test(),
"mkdir test...."
);
let expected = dirs.test().join("test....");
assert!(expected.exists());
})
}
#[test]
fn creates_directory_three_dots_quotation_marks() {
Playground::setup("mkdir_test_1", |dirs, _| {
nu!(
cwd: dirs.test(),
"mkdir 'test...'"
);
let expected = dirs.test().join("test...");
assert!(expected.exists());
})
}