test, examples: lang: Add new syntax for map lookup

Sugar at last!
This commit is contained in:
James Shubin
2023-10-17 15:32:13 -04:00
parent ea0af4dc43
commit 96093984e4
10 changed files with 18 additions and 23 deletions

View File

@@ -15,7 +15,7 @@ $t = sys.hasenv("TEST")
$f = sys.hasenv("DOESNOTEXIST")
$env = sys.env()
$m = map_lookup_optional($env, "TEST", "321")
$m = $env["TEST"] || "321"
file "${tmpdir}/environ" {
state => $const.res.file.state.exists,