diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-03-20 08:40:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-03-20 08:40:59 +0200 |
commit | ce29e3d72ded432b9ac9354ac92c588142de9b89 (patch) | |
tree | fd7acd2d0e34b10315b5572f98619dbbf285c177 /libbuild2/lexer+normal.test.testscript | |
parent | aeda0dedb2cdb0980d976ae92e1672476b62d7ed (diff) |
Lexer support for default value assignment (?=)
Note: not yet supported in the parser.
Diffstat (limited to 'libbuild2/lexer+normal.test.testscript')
-rw-r--r-- | libbuild2/lexer+normal.test.testscript | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libbuild2/lexer+normal.test.testscript b/libbuild2/lexer+normal.test.testscript new file mode 100644 index 0000000..c9448c3 --- /dev/null +++ b/libbuild2/lexer+normal.test.testscript @@ -0,0 +1,36 @@ +# file : libbuild2/lexer+normal.test.testscript +# license : MIT; see accompanying LICENSE file + +test.arguments = normal + +: assign +: +$* <:'x=y' >>EOO +'x' += +'y' +EOO + +: append +: +$* <:'x+=y' >>EOO +'x' ++= +'y' +EOO + +: prepend +: +$* <:'x=+y' >>EOO +'x' +=+ +'y' +EOO + +: default-assign +: +$* <:'x?=y' >>EOO +'x' +?= +'y' +EOO |