bc: fix comment handling

function                                             old     new   delta
bc_vm_run                                            514     513      -1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-12-13 17:23:24 +01:00
parent 7dc0a51286
commit 766f67250f
2 changed files with 17 additions and 2 deletions

View File

@ -4,6 +4,18 @@
. ./testing.sh
# testing "test name" "command" "expected result" "file input" "stdin"
testing "bc comment 1" \
"bc" \
"3\n" \
"" "1 /* comment */ + 2"
testing "bc comment 2: /*/ is not a closed comment" \
"bc" \
"4\n" \
"" "1 /*/ + 2 */ + 3"
tar xJf bc_large.tar.xz
for f in bc*.bc; do