Enable string interpolation for environment shorthand (#5463)

This commit is contained in:
Reilly Wood
2022-05-07 04:21:29 -07:00
committed by GitHub
parent b0647f780d
commit 08e495ea67
2 changed files with 19 additions and 7 deletions

View File

@ -22,6 +22,15 @@ fn env_shorthand_with_equals() {
assert_eq!(actual.out, "my_module=info");
}
#[test]
fn env_shorthand_with_interpolation() {
let actual = nu!(cwd: ".", r#"
let num = 123
FOO=$"($num) bar" echo $env.FOO
"#);
assert_eq!(actual.out, "123 bar");
}
#[test]
fn env_shorthand_with_comma_equals() {
let actual = nu!(cwd: ".", r#"