aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/directive/parsing.testscript23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/directive/parsing.testscript b/tests/directive/parsing.testscript
new file mode 100644
index 0000000..04dd054
--- /dev/null
+++ b/tests/directive/parsing.testscript
@@ -0,0 +1,23 @@
+# file : tests/directive/assert.testscript
+# license : MIT; see accompanying LICENSE file
+
+# Test overall directive parsing.
+#
+
+.include ../common.testscript
+
+: assign
+: Test differentiation with variable assignment.
+:
+{
+ # Note: ? is expanded as pattern.
+
+ $* <'print +foo' >'+foo' : plus
+ $* <'print ?foo' >'' : ques
+
+ $* <'print + foo' >'+ foo' : plus-ws-eq
+ $* <'print ? foo' >'foo' : ques-ws-eq
+
+ $* <'print +' >'+' : plus-only
+ $* <'print ?' >'' : ques-only
+}