mirror of
https://github.com/nushell/nushell.git
synced 2024-12-25 00:19:39 +01:00
79182db587
* Rename "which" feature to "which-support" * Ignore currently broken environment tests
23 lines
603 B
Rust
23 lines
603 B
Rust
mod env;
|
|
|
|
// FIXME: nu_env tests depend on autoenv which hasn't been ported yet
|
|
// 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
|
|
}
|
|
}
|
|
}
|