From 4677ec429de974a4b91a22711af48df366a224b9 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Tue, 31 May 2011 09:59:10 +1000 Subject: Fix a minor parsing bug - quoted backslash newline Should eat spaces and tabs after the newline Signed-off-by: Steve Bennett --- tests/parse.test | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/parse.test b/tests/parse.test index 8422c51..870d4ff 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -227,8 +227,33 @@ test parse-1.45 "spaces before expr function args" { expr {round (3.2)} } 3 -test parse-1.45 "expr function missing paren" { +test parse-1.46 "expr function missing paren" { catch {expr {round 3.2}} } 1 +test parse-1.47 "backslash newline in quotes" { + # spaces + set x "abc\ + def" +} "abc def" + +test parse-1.48 "backslash newline in quotes" { + # tabs + set x "abc\ + def" +} "abc def" + +test parse-1.49 "backslash newline in quotes" { + # tabs plus newline + set x "abc\ + +def" +} "abc \ndef" + +test parse-1.50 "backslash newline in quotes" { + # tabs plus newline + set x "abc\ +def" +} "abc def" + testreport -- cgit v1.1