mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Add with-env command (#1717)
This commit is contained in:
@ -46,4 +46,5 @@ mod touch;
|
||||
mod trim;
|
||||
mod uniq;
|
||||
mod where_;
|
||||
mod with_env;
|
||||
mod wrap;
|
||||
|
11
crates/nu-cli/tests/commands/with_env.rs
Normal file
11
crates/nu-cli/tests/commands/with_env.rs
Normal file
@ -0,0 +1,11 @@
|
||||
use nu_test_support::nu;
|
||||
|
||||
#[test]
|
||||
fn with_env_extends_environment() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats",
|
||||
"with-env [FOO BARRRR] {echo $nu.env} | get FOO"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "BARRRR");
|
||||
}
|
Reference in New Issue
Block a user