aboutsummaryrefslogtreecommitdiff
path: root/tests/in/testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-09-02 10:29:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-09-02 10:29:15 +0200
commit8ecc09653d70fe8df4fc9fcd7214ba85e6db9c9c (patch)
tree7c5a8bbe8899faa10100dcf8b09b1e66f7d2900d /tests/in/testscript
parentce69ad7c2aaf517ec3f789300bf1ae29d8f0dc5d (diff)
Add ability to specify `in` rule substitution as key-value pairs
Diffstat (limited to 'tests/in/testscript')
-rw-r--r--tests/in/testscript29
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/in/testscript b/tests/in/testscript
index c4f534c..5dce1d3 100644
--- a/tests/in/testscript
+++ b/tests/in/testscript
@@ -17,7 +17,9 @@ cat <<EOI >=test.in;
EOI
cat <<EOI >=buildfile;
file{test}: in{test}
- file{test}: foo = FOO
+ {
+ foo = FOO
+ }
EOI
$* <<<buildfile;
cat test >>EOO;
@@ -25,6 +27,27 @@ cat test >>EOO;
EOO
$* clean <<<buildfile
+: substitution-map
+:
+cat <<EOI >=test.in;
+ foo = $_foo$
+ bar = $bar$
+ EOI
+cat <<EOI >=buildfile;
+ file{test}: in{test}
+ {
+ in.substitutions = _foo@FOO
+ in.substitutions += bar@BAR
+ bar = wrong
+ }
+ EOI
+$* <<<buildfile;
+cat test >>EOO;
+ foo = FOO
+ bar = BAR
+ EOO
+$* clean <<<buildfile
+
: lax
:
cat <<EOI >=test.in;
@@ -33,7 +56,9 @@ cat <<EOI >=test.in;
EOI
$* <<EOI &test &test.d;
file{test}: in{test}
- file{test}: in.mode = lax
+ {
+ in.mode = lax
+ }
EOI
cat test >>EOO
$10