summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2018-12-18 14:37:16 +0100
committerDenys Vlasenko2018-12-18 14:39:33 +0100
commit55f3cab7e9f61c1e9fc342f2d245d6b055a08b84 (patch)
tree3ebd6f171988f9ce3d006947301b3dccb594ad01 /testsuite
parenta199cc95b726df7023c19fa5130a3b55287e43a2 (diff)
downloadbusybox-55f3cab7e9f61c1e9fc342f2d245d6b055a08b84.zip
busybox-55f3cab7e9f61c1e9fc342f2d245d6b055a08b84.tar.gz
bc: fix "echo -n '#foo' | bc" not eating last 'o'
function old new delta zdc_parse_expr 656 653 -3 bc_lex_lineComment 39 36 -3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6) Total: -6 bytes text data bss dec hex filename 981424 485 7296 989205 f1815 busybox_old 981418 485 7296 989199 f180f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/bc.tests5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
index e0a45a8..e303cf6 100755
--- a/testsuite/bc.tests
+++ b/testsuite/bc.tests
@@ -16,6 +16,11 @@ testing "bc comment 2: /*/ is not a closed comment" \
"4\n" \
"" "1 /*/ + 2 */ + 3"
+testing "bc comment 3: unterminated #comment" \
+ "bc" \
+ "" \
+ "" "#foo" # no trailing newline
+
testing "bc backslash 1" \
"bc" \
"3\n" \