From 94576d2b972b3bd136fbe8057c95690ae36ea8c9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 25 Dec 2018 23:45:57 +0100 Subject: bc: fix interactive handling of comments in strings and quotes in comments function old new delta zbc_lex_next 1965 1979 +14 Signed-off-by: Denys Vlasenko --- testsuite/bc.tests | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'testsuite') diff --git a/testsuite/bc.tests b/testsuite/bc.tests index 42fe83013..3fbb49996 100755 --- a/testsuite/bc.tests +++ b/testsuite/bc.tests @@ -6,16 +6,28 @@ # testing "test name" "command" "expected result" "file input" "stdin" -testing "bc comment 1" \ +testing "bc comment" \ "bc" \ "3\n" \ "" "1 /* comment */ + 2" -testing "bc comment 2: /*/ is not a closed comment" \ +testing "bc /*/ is not a closed comment" \ "bc" \ "4\n" \ "" "1 /*/ + 2 */ + 3" +# this needs interactive testing +testing "bc comment with \"" \ + "bc" \ + "3\n" \ + "" "1 /* \" */ + 2" + +# this needs interactive testing +testing "bc \"string/*\" is not a comment" \ + "bc" \ + "string/*9\n" \ + "" "\"string/*\";9" + testing "bc comment 3: unterminated #comment" \ "bc" \ "" \ -- cgit v1.2.3