From 630b498533f5a9a1e9d40893f4806ef855f1e03b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 1 May 2020 17:09:59 +0200 Subject: Fix outstanding issue with directive vs assignment differentiation Specifically, now the following does the right thing: print +foo --- tests/directive/parsing.testscript | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/directive/parsing.testscript (limited to 'tests/directive') 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 +} -- cgit v1.1