All field assignment into the env variable (#7099)

This commit is contained in:
JT
2022-11-11 20:16:07 +13:00
committed by GitHub
parent cb926f7b49
commit 099b571e8f
2 changed files with 34 additions and 8 deletions

View File

@ -77,6 +77,14 @@ fn env_shorthand_multi() {
assert_eq!(actual.out, "barbaz");
}
#[test]
fn env_assignment() {
let actual = nu!(cwd: ".", r#"
$env.FOOBAR = "barbaz"; $env.FOOBAR
"#);
assert_eq!(actual.out, "barbaz");
}
#[test]
fn let_env_file_pwd_env_var_fails() {
let actual = nu!(cwd: ".", r#"let-env FILE_PWD = 'foo'"#);