Bash-like shorthand with-env (#1718)

* Bash-like shorthand with-env

* fix clippy warning
This commit is contained in:
Jonathan Turner
2020-05-06 18:57:37 +12:00
committed by GitHub
parent b37e420c7c
commit c06a692709
2 changed files with 123 additions and 1 deletions

View File

@ -9,3 +9,13 @@ fn with_env_extends_environment() {
assert_eq!(actual, "BARRRR");
}
#[test]
fn with_env_shorthand() {
let actual = nu!(
cwd: "tests/fixtures/formats",
"FOO=BARRRR echo $nu.env | get FOO"
);
assert_eq!(actual, "BARRRR");
}