mirror of
https://github.com/nushell/nushell
synced 2024-12-28 22:13:10 +00:00
8fc8fc89aa
Improvements overall to Nu. Also among the changes here, we can also be more confident towards incorporating `3041`. End to end tests for checking envs properly exported to externals is not added here (since it's in the other PR) A few things added in this PR (probably forgetting some too) * no writes happen to history during test runs. * environment syncing end to end coverage added. * clean up / refactorings few areas. * testing API for finer control (can write tests passing more than one pipeline) * can pass environment variables in tests that nu will inherit when running. * No longer needed. * no longer under a module. No need to use super.
21 lines
576 B
Rust
21 lines
576 B
Rust
mod configuration;
|
|
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.to_string()));
|
|
let out = block();
|
|
nu!(cwd: dirs.root(), format!("autoenv untrust \"{}\"", for_env_manifest.to_string()));
|
|
|
|
out
|
|
}
|
|
}
|
|
}
|