touch: support multiple arguments (#2386)

Fixes #2384
This commit is contained in:
Jörn Zaefferer
2020-08-22 02:08:30 +02:00
committed by GitHub
parent 11352f87f0
commit ee26590011
3 changed files with 65 additions and 22 deletions

View File

@ -10,7 +10,22 @@ fn creates_a_file_when_it_doesnt_exist() {
);
let path = dirs.test().join("i_will_be_created.txt");
assert!(path.exists());
})
}
#[test]
fn creates_two_files() {
Playground::setup("create_test_2", |dirs, _sandbox| {
nu!(
cwd: dirs.test(),
"touch a b"
);
let path = dirs.test().join("a");
assert!(path.exists());
let path2 = dirs.test().join("b");
assert!(path2.exists());
})
}