forked from extern/nushell
c52d45cb97
* start working on source-env * WIP * Get most tests working, still one to go * Fix file-relative paths; Report parser error * Fix merge conflicts; Restore source as deprecated * Tests: Use source-env; Remove redundant tests * Fmt * Respect hidden env vars * Fix file-relative eval for source-env * Add file-relative eval to "overlay use" * Use FILE_PWD only in source-env and "overlay use" * Ignore new tests for now This will be another issue * Throw an error if setting FILE_PWD manually * Fix source-related test failures * Fix nu-check to respect FILE_PWD * Fix corrupted spans in source-env shell errors * Fix up some references to old source * Remove deprecation message * Re-introduce deleted tests Co-authored-by: kubouch <kubouch@gmail.com>
24 lines
601 B
Rust
24 lines
601 B
Rust
mod env;
|
|
mod source_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(), "autoenv trust \"{}\"", for_env_manifest);
|
|
let out = block();
|
|
nu!(cwd: dirs.root(), "autoenv untrust \"{}\"", for_env_manifest);
|
|
|
|
out
|
|
}
|
|
}
|
|
}
|