diff options
author | Denys Vlasenko | 2018-12-25 23:45:57 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-12-25 23:45:57 +0100 |
commit | 94576d2b972b3bd136fbe8057c95690ae36ea8c9 (patch) | |
tree | cc1b99c8e3fb95448b7595fea6b141516894cf40 /testsuite | |
parent | c192b0442b0b3f50d4fbb34322e07f0ff3c5aecd (diff) | |
download | busybox-94576d2b972b3bd136fbe8057c95690ae36ea8c9.zip busybox-94576d2b972b3bd136fbe8057c95690ae36ea8c9.tar.gz |
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 <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/bc.tests | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests index 42fe830..3fbb499 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" \ "" \ |