mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 17:03:17 +02:00
All field assignment into the env variable (#7099)
This commit is contained in:
@ -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'"#);
|
||||
|
Reference in New Issue
Block a user