mirror of
https://github.com/nushell/nushell.git
synced 2025-02-24 22:41:54 +01:00
20 lines
477 B
Rust
20 lines
477 B
Rust
use nu_test_support::fs::Stub::EmptyFile;
|
|
use nu_test_support::nu;
|
|
use nu_test_support::playground::Playground;
|
|
|
|
#[test]
|
|
fn adds_a_file() {
|
|
Playground::setup("add_test_1", |dirs, sandbox| {
|
|
sandbox.with_files(vec![EmptyFile("i_will_be_created.txt")]);
|
|
|
|
nu!(
|
|
cwd: dirs.root(),
|
|
"touch touch_test/i_will_be_created.txt"
|
|
);
|
|
|
|
let path = dirs.test().join("i_will_be_created.txt");
|
|
|
|
assert!(path.exists());
|
|
})
|
|
}
|