From e3ff4880273746c34d07e641110abaf38a1f1fca Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 25 Oct 2016 07:46:08 +0200 Subject: Add tests for first_token, second_token testscript lexer modes --- unit-tests/test/script/lexer/second-token.test | 37 +++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'unit-tests/test/script/lexer/second-token.test') diff --git a/unit-tests/test/script/lexer/second-token.test b/unit-tests/test/script/lexer/second-token.test index a665fed..cc044dd 100644 --- a/unit-tests/test/script/lexer/second-token.test +++ b/unit-tests/test/script/lexer/second-token.test @@ -1,8 +1,43 @@ # Note: this mode auto-expires after each token. # -test.arguments += first-token +test.arguments += second-token $* <";" >>EOO # semi-only ; EOO + +$* <"=foo" >>EOO # assign += +'foo' + +EOO + +$* <"+= foo" >>EOO # append ++= +'foo' + +EOO + +$* <" =+ foo" >>EOO # prepend +=+ +'foo' + +EOO + +$* <"foo=bar" >>EOO # assign-leading +'foo=bar' + +EOO + +$* <"foo+= bar" >>EOO # append-leading +'foo+=' +'bar' + +EOO + +$* <"foo =+bar" >>EOO # prepend-leading +'foo' +'=+bar' + +EOO -- cgit v1.1