diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-13 13:43:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-13 13:52:32 +0200 |
commit | 355534c22ab547bceae189e11ce36fa0dea4e743 (patch) | |
tree | c93af55fb30dd13da13bbcadd3729ed386f6e824 /tests/variable | |
parent | e5d55e3245e148d675d4be607f1bfa944c4559e7 (diff) |
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'.
Diffstat (limited to 'tests/variable')
-rw-r--r-- | tests/variable/override/testscript | 29 |
1 files changed, 29 insertions, 0 deletions
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 <<EOI >>EOO + print $x + EOI + 0 1 2 + EOO + + : before + : + $* x+=2 x=+0 x=1 <<EOI >>EOO + print $x + EOI + 1 + EOO + + : both + : + $* x=+0 x=1 x+=2 <<EOI >>EOO + print $x + EOI + 1 2 + EOO +} |