aboutsummaryrefslogtreecommitdiff
path: root/tests/variable
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-03-14 17:20:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-03-14 17:20:02 +0200
commite20a351013745e8d6c3a0a99bd40c172ed0ae8be (patch)
treeb0e6d24dbc097c2001e6bb4b0c0357bcb83bdc72 /tests/variable
parentd1b3ad7b302d037c8154bab9c4810d499c0bf1e4 (diff)
Add support for multiple variable overrides
Now we can do: $ b config.cxx.coptions=-O3 config.cxx.coptions=-O0 Or even: $ b config.cxx.coptions=-O3 config.cxx.coptions+=-g
Diffstat (limited to 'tests/variable')
-rw-r--r--tests/variable/override/testscript30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/variable/override/testscript b/tests/variable/override/testscript
index 28225c1..f8a930b 100644
--- a/tests/variable/override/testscript
+++ b/tests/variable/override/testscript
@@ -105,3 +105,33 @@
1 2
EOO
}
+
+: multiple
+:
+{
+ : assign
+ :
+ $* x=0 !y=0 x=1 !y=1 <<EOI >>EOO
+ print $x
+ print $y
+ EOI
+ 1
+ 1
+ EOO
+
+ : append
+ :
+ $* x=0 x+=1 x+=2 <<EOI >>EOO
+ print $x
+ EOI
+ 0 1 2
+ EOO
+
+ : prepend
+ :
+ $* x=2 x=+1 x=+0 <<EOI >>EOO
+ print $x
+ EOI
+ 0 1 2
+ EOO
+}