Add with-env command (#1717)

This commit is contained in:
Jonathan Turner
2020-05-06 15:56:31 +12:00
committed by GitHub
parent 22e70478a4
commit b37e420c7c
13 changed files with 153 additions and 12 deletions

View File

@ -46,4 +46,5 @@ mod touch;
mod trim;
mod uniq;
mod where_;
mod with_env;
mod wrap;

View 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");
}