aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/lexer/variable.test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-16 13:29:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:21 +0200
commit4230333bc5b32d30e35264b1104240bb5e2247ff (patch)
tree0e3873c012dcf83281ecb43c4cfe2780a794a25c /unit-tests/test/script/lexer/variable.test
parentd81ad6a0b20613ac77e115ca273cd48eaeeae1c8 (diff)
Implement testscript $*, $NN, $~ special variables
Diffstat (limited to 'unit-tests/test/script/lexer/variable.test')
-rw-r--r--unit-tests/test/script/lexer/variable.test46
1 files changed, 46 insertions, 0 deletions
diff --git a/unit-tests/test/script/lexer/variable.test b/unit-tests/test/script/lexer/variable.test
new file mode 100644
index 0000000..6478fea
--- /dev/null
+++ b/unit-tests/test/script/lexer/variable.test
@@ -0,0 +1,46 @@
+# Test handling custom variable names ($*, $~, $NN).
+#
+test.arguments += variable
+
+$* <"*" >>EOO
+'*'
+<newline>
+EOO
+
+$* <"*abc" >>EOO
+'*'
+'abc'
+<newline>
+EOO
+
+$* <"~" >>EOO
+'~'
+<newline>
+EOO
+
+$* <"~123" >>EOO
+'~'
+'123'
+<newline>
+EOO
+
+$* <"0" >>EOO
+'0'
+<newline>
+EOO
+
+$* <"10" >>EOO
+'10'
+<newline>
+EOO
+
+$* <"101" >>EOO
+'101'
+<newline>
+EOO
+
+$* <"1abc" >>EOO
+'1'
+'abc'
+<newline>
+EOO