aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/lexer+normal.test.testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-20 08:40:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-20 08:40:59 +0200
commitce29e3d72ded432b9ac9354ac92c588142de9b89 (patch)
treefd7acd2d0e34b10315b5572f98619dbbf285c177 /libbuild2/lexer+normal.test.testscript
parentaeda0dedb2cdb0980d976ae92e1672476b62d7ed (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.testscript36
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