summaryrefslogtreecommitdiff
path: root/tests/test_cases/config/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cases/config/data')
-rw-r--r--tests/test_cases/config/data/TARGETS48
-rw-r--r--tests/test_cases/config/data/foo.in13
2 files changed, 61 insertions, 0 deletions
diff --git a/tests/test_cases/config/data/TARGETS b/tests/test_cases/config/data/TARGETS
new file mode 100644
index 0000000..f3e7cf0
--- /dev/null
+++ b/tests/test_cases/config/data/TARGETS
@@ -0,0 +1,48 @@
+{ "blueprint":
+ { "type": ["@", "rules", "CC/auto", "config_file"]
+ , "input": ["foo.in"]
+ , "output": ["foo.h"]
+ , "magic_string": ["cmakedefine"]
+ }
+, "blueprint_@only":
+ { "type": ["@", "rules", "CC/auto", "config_file"]
+ , "input": ["foo.in"]
+ , "output": ["foo.h"]
+ , "magic_string": ["cmakedefine"]
+ , "@only": ["true"]
+ }
+, "header_both":
+ { "type": "configure"
+ , "target": "blueprint"
+ , "config":
+ { "type": "let*"
+ , "bindings":
+ [ [ "defines"
+ , [ ["FOO", "foo"]
+ , ["BAR", "bar"]
+ , ["NO_MAGIC_AT", "magic_at"]
+ , ["NO_MAGIC_CURLY", "magic_curly"]
+ ]
+ ]
+ ]
+ , "body": {"type": "env", "vars": ["defines"]}
+ }
+ }
+, "header_@only":
+ { "type": "configure"
+ , "target": "blueprint_@only"
+ , "config":
+ { "type": "let*"
+ , "bindings":
+ [ [ "defines"
+ , [ ["FOO", "foo"]
+ , ["BAR", "bar"]
+ , ["NO_MAGIC_AT", "magic_at"]
+ , ["NO_MAGIC_CURLY", "magic_curly"]
+ ]
+ ]
+ ]
+ , "body": {"type": "env", "vars": ["defines"]}
+ }
+ }
+}
diff --git a/tests/test_cases/config/data/foo.in b/tests/test_cases/config/data/foo.in
new file mode 100644
index 0000000..66bd9ba
--- /dev/null
+++ b/tests/test_cases/config/data/foo.in
@@ -0,0 +1,13 @@
+// comment 1
+#cmakedefine01 FOO
+#cmakedefine01 BAX
+#cmakedefine FOO "@FOO@"
+#cmakedefine BAR "@FOO@@FOO@ bar ${FOO}"
+#cmakedefine BAZ "baz"
+#cmakedefine BAX
+#cmakedefine FOO
+// comment 2
+@NO_MAGIC_AT@
+${NO_MAGIC_CURLY}
+undefined_at-@UNDEFINED@-
+undefined_curly-${UNDEFINED}-