2020-02-18 21:54:32 +01:00
|
|
|
use nu_test_support::nu;
|
|
|
|
use nu_test_support::playground::Playground;
|
|
|
|
|
|
|
|
#[test]
|
2020-03-01 18:19:09 +01:00
|
|
|
fn creates_a_file_when_it_doesnt_exist() {
|
|
|
|
Playground::setup("create_test_1", |dirs, _sandbox| {
|
2020-02-18 21:54:32 +01:00
|
|
|
nu!(
|
2020-03-01 18:19:09 +01:00
|
|
|
cwd: dirs.test(),
|
|
|
|
"touch i_will_be_created.txt"
|
2020-02-18 21:54:32 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
let path = dirs.test().join("i_will_be_created.txt");
|
|
|
|
|
|
|
|
assert!(path.exists());
|
|
|
|
})
|
|
|
|
}
|