aboutsummaryrefslogtreecommitdiff
path: root/testsuite/bc.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-22 01:34:10 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-22 01:34:10 +0100
commit8c1e72359626789b1b98aeac0225d73d1336bb59 (patch)
tree7c89877da4953bccddb88943e49def923c2d7a40 /testsuite/bc.tests
parent1dc4de9d9bbdf3f60b76cecf94d756ef9394e25f (diff)
downloadbusybox-w32-8c1e72359626789b1b98aeac0225d73d1336bb59.tar.gz
busybox-w32-8c1e72359626789b1b98aeac0225d73d1336bb59.tar.bz2
busybox-w32-8c1e72359626789b1b98aeac0225d73d1336bb59.zip
bc: unbreak read(), remove checks for nested read()
function old new delta zbc_parse_pushSTR - 65 +65 common_parse_expr - 32 +32 bc_error_nested_read_call 10 - -10 bc_parse_expr_empty_ok 1977 1963 -14 zdc_parse_expr 635 615 -20 zcommon_parse_expr 32 - -32 zbc_program_exec 4064 4023 -41 bc_parse_pushSTR 65 - -65 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 0/3 up/down: 97/-182) Total: -85 bytes text data bss dec hex filename 981661 485 7296 989442 f1902 busybox_old 981540 485 7296 989321 f1889 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rwxr-xr-xtestsuite/bc.tests15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
index b3ce894ee..c84a2987c 100755
--- a/testsuite/bc.tests
+++ b/testsuite/bc.tests
@@ -31,6 +31,21 @@ testing "bc string 1" \
31 "STR\n" \ 31 "STR\n" \
32 "" "\"STR\n\"" 32 "" "\"STR\n\""
33 33
34testing "bc read() 4<EOF>" \
35 "bc input" \
36 "4\n" \
37 "read();halt" "4"
38
39testing "bc read()^2" \
40 "bc input" \
41 "16\n" \
42 "read()^2;halt" "4\n"
43
44testing "bc read()*read()" \
45 "bc input" \
46 "20\n" \
47 "read()*read();halt" "4\n5"
48
34testing "bc if 0 else" \ 49testing "bc if 0 else" \
35 "bc" \ 50 "bc" \
36 "2\n9\n" \ 51 "2\n9\n" \