summaryrefslogtreecommitdiff
path: root/test/EXPRESSIONS
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-12 15:30:49 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-12 15:30:49 +0200
commitc5f9f2ade139a994147eeff8fb5495e5703680b1 (patch)
tree2f5448e0670a166beaa6a02616659b6132db46ce /test/EXPRESSIONS
parentfddd776e5fe3dc2435e9b849e6c59b8b8c6e881f (diff)
parentd1b7465073cd8d60ec6611f541609215d54b4aa3 (diff)
downloadrules-cc-c5f9f2ade139a994147eeff8fb5495e5703680b1.tar.gz
Merge branch 'just-rules' into rules
Diffstat (limited to 'test/EXPRESSIONS')
-rw-r--r--test/EXPRESSIONS60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/EXPRESSIONS b/test/EXPRESSIONS
new file mode 100644
index 0000000..006e804
--- /dev/null
+++ b/test/EXPRESSIONS
@@ -0,0 +1,60 @@
+{ "matrix":
+ { "vars": ["TEST_MATRIX"]
+ , "expression":
+ { "type": "foldl"
+ , "var": "VAR"
+ , "accum_var": "so far"
+ , "range":
+ { "type": "keys"
+ , "$1":
+ { "type": "var"
+ , "name": "TEST_MATRIX"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "start": [{"type": "'", "$1": {"": {"TEST_MATRIX": null}}}]
+ , "body":
+ { "type": "++"
+ , "$1":
+ { "type": "foreach_map"
+ , "var_key": "stage"
+ , "var_val": "VALUE"
+ , "range":
+ { "type": "lookup"
+ , "key": {"type": "var", "name": "VAR"}
+ , "map": {"type": "var", "name": "TEST_MATRIX"}
+ }
+ , "body":
+ { "type": "++"
+ , "$1":
+ { "type": "foreach"
+ , "range": {"type": "var", "name": "so far"}
+ , "body":
+ { "type": "foreach_map"
+ , "range":
+ { "type": "to_subdir"
+ , "subdir": {"type": "var", "name": "stage"}
+ , "$1": {"type": "var", "name": "_"}
+ }
+ , "body":
+ { "type": "singleton_map"
+ , "key": {"type": "var", "name": "_"}
+ , "value":
+ { "type": "map_union"
+ , "$1":
+ [ {"type": "var", "name": "$_"}
+ , { "type": "singleton_map"
+ , "key": {"type": "var", "name": "VAR"}
+ , "value": {"type": "var", "name": "VALUE"}
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}