summaryrefslogtreecommitdiff
path: root/testsuite/bc.tests
diff options
context:
space:
mode:
authorDenys Vlasenko2018-12-13 17:23:24 +0100
committerDenys Vlasenko2018-12-13 17:43:23 +0100
commit766f67250f01dc5458093c31ec0d2ec09cad65a2 (patch)
tree0203b6b381d35d5784acf8bb9eccf07dc5958396 /testsuite/bc.tests
parent7dc0a51286b7898fcc17033dce1f1856e78494b4 (diff)
downloadbusybox-766f67250f01dc5458093c31ec0d2ec09cad65a2.zip
busybox-766f67250f01dc5458093c31ec0d2ec09cad65a2.tar.gz
bc: fix comment handling
function old new delta bc_vm_run 514 513 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/bc.tests')
-rwxr-xr-xtestsuite/bc.tests12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
index 3246009..4f0d50f 100755
--- a/testsuite/bc.tests
+++ b/testsuite/bc.tests
@@ -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