aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2022-12-13 13:02:10 -0800
committerCole Faust <colefaust@google.com>2022-12-13 13:02:10 -0800
commit44de6d8f7a37d701e95213c648547568ffccc2a0 (patch)
tree2253bd57a472fdf27d7f176bb37cd92ca680ce6f /tests
parent14b12d9e312b039c42973303a677d6bede9a6e0a (diff)
downloadbuild-44de6d8f7a37d701e95213c648547568ffccc2a0.tar.gz
Make clear_var_list set nonexistant variables to empty strings
Make's clear-var-list causes the variables to exist as empty strings. Mimic that functionality in starlark for the variable diff and ?=. Bug: 262303006 Test: ./out/rbcrun ./build/make/tests/run.rbc Change-Id: I5f9c8cf342d875b1022c5c74906e59fa68fcd6c9
Diffstat (limited to 'tests')
-rw-r--r--tests/run.rbc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/run.rbc b/tests/run.rbc
index 06f56d324d..e8c4caae36 100644
--- a/tests/run.rbc
+++ b/tests/run.rbc
@@ -164,13 +164,14 @@ assert_eq({"A_LIST_VARIABLE": ["foo"]}, board_globals_base)
g = {"FOO": "a", "BAR": "c", "BAZ": "e"}
cfg = {"FOO": "b", "BAR": "d", "BAZ": "f"}
-rblf.clear_var_list(g, struct(cfg=cfg), "FOO BAR")
+rblf.clear_var_list(g, struct(cfg=cfg), "FOO BAR NEWVAR")
assert_eq("", g["FOO"])
assert_eq("", cfg["FOO"])
assert_eq("", g["BAR"])
assert_eq("", cfg["BAR"])
assert_eq("e", g["BAZ"])
assert_eq("f", cfg["BAZ"])
+assert_eq("", g.get("NEWVAR"))
test_single_value_inheritance()
test_artifact_path_requirements()