From e20a351013745e8d6c3a0a99bd40c172ed0ae8be Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 14 Mar 2019 17:20:02 +0200 Subject: 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 --- tests/variable/override/testscript | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests') 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 <>EOO + print $x + print $y + EOI + 1 + 1 + EOO + + : append + : + $* x=0 x+=1 x+=2 <>EOO + print $x + EOI + 0 1 2 + EOO + + : prepend + : + $* x=2 x=+1 x=+0 <>EOO + print $x + EOI + 0 1 2 + EOO +} -- cgit v1.1