mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 14:01:01 +02:00
Enable string interpolation for environment shorthand (#5463)
This commit is contained in:
@ -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#"
|
||||
|
Reference in New Issue
Block a user