mirror of
https://github.com/nushell/nushell
synced 2024-12-28 14:03:09 +00:00
cc1b784e3d
* Add initial nu-test-support port * finish changing binary name * Oops, these aren't Windows-safe tests
22 lines
561 B
Rust
22 lines
561 B
Rust
mod configuration;
|
|
mod env;
|
|
mod in_sync;
|
|
mod nu_env;
|
|
|
|
pub mod support {
|
|
use nu_test_support::{nu, playground::*, Outcome};
|
|
|
|
pub struct Trusted;
|
|
|
|
impl Trusted {
|
|
pub fn in_path(dirs: &Dirs, block: impl FnOnce() -> Outcome) -> Outcome {
|
|
let for_env_manifest = dirs.test().to_string_lossy();
|
|
|
|
nu!(cwd: dirs.root(), format!("autoenv trust \"{}\"", for_env_manifest));
|
|
let out = block();
|
|
nu!(cwd: dirs.root(), format!("autoenv untrust \"{}\"", for_env_manifest));
|
|
|
|
out
|
|
}
|
|
}
|
|
}
|