From 355534c22ab547bceae189e11ce36fa0dea4e743 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 13 Mar 2019 13:43:54 +0200 Subject: Cutoff append/prepend overrides that come before assignment override For example: $ b x+=1 x=2 x+=3 Should result in '2 3', not '1 2 3'. --- tests/variable/override/testscript | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'tests') diff --git a/tests/variable/override/testscript b/tests/variable/override/testscript index 82b8e98..28225c1 100644 --- a/tests/variable/override/testscript +++ b/tests/variable/override/testscript @@ -56,6 +56,7 @@ } : override-cached +: : Test overriding cached target type/pattern-specific prepend/append : { @@ -76,3 +77,31 @@ 1 a b X EOO } + +: order +: +{ + : after + : + $* x=1 x+=2 x=+0 <>EOO + print $x + EOI + 0 1 2 + EOO + + : before + : + $* x+=2 x=+0 x=1 <>EOO + print $x + EOI + 1 + EOO + + : both + : + $* x=+0 x=1 x+=2 <>EOO + print $x + EOI + 1 2 + EOO +} -- cgit v1.1