aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/lexer/first-token.test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-25 07:46:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:35 +0200
commite3ff4880273746c34d07e641110abaf38a1f1fca (patch)
tree2d8243a21c4b6f1415583f81b7fbc3095354a764 /unit-tests/test/script/lexer/first-token.test
parent52682b19b9e9055e99bb5f1988ae7764fa0e7158 (diff)
Add tests for first_token, second_token testscript lexer modes
Diffstat (limited to 'unit-tests/test/script/lexer/first-token.test')
-rw-r--r--unit-tests/test/script/lexer/first-token.test41
1 files changed, 41 insertions, 0 deletions
diff --git a/unit-tests/test/script/lexer/first-token.test b/unit-tests/test/script/lexer/first-token.test
index a665fed..fb75c8b 100644
--- a/unit-tests/test/script/lexer/first-token.test
+++ b/unit-tests/test/script/lexer/first-token.test
@@ -6,3 +6,44 @@ $* <";" >>EOO # semi-only
;
<newline>
EOO
+
+$* <"+foo" >>EOO # setup
++
+'foo'
+<newline>
+EOO
+
+$* <"- foo" >>EOO # tdown
+-
+'foo'
+<newline>
+EOO
+
+$* <"foo+bar" >>EOO # plus-leading
+'foo+bar'
+<newline>
+EOO
+
+$* <"foo- x" >>EOO # minus-leading
+'foo-'
+'x'
+<newline>
+EOO
+
+$* <"foo=" >>EOO # assign
+'foo'
+'='
+<newline>
+EOO
+
+$* <"foo+=" >>EOO # append
+'foo'
+'+='
+<newline>
+EOO
+
+$* <"foo=+" >>EOO # prepend
+'foo'
+'=+'
+<newline>
+EOO