summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2018-12-16 22:44:51 +0100
committerDenys Vlasenko2018-12-16 22:44:51 +0100
commit06ade77002eaa28bb3f19480f68ad270b22bd48e (patch)
tree257712440df650debf886de5b614c81b6e3af08b /testsuite
parent146a79d19c19465aa5a29c271341158b46cc5ade (diff)
downloadbusybox-06ade77002eaa28bb3f19480f68ad270b22bd48e.zip
busybox-06ade77002eaa28bb3f19480f68ad270b22bd48e.tar.gz
bc: simplify use of "ip" in loop parsing functions
function old new delta zbc_parse_stmt_possibly_auto 2106 2065 -41 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-41) Total: -41 bytes text data bss dec hex filename 982076 485 7296 989857 f1aa1 busybox_old 982035 485 7296 989816 f1a78 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/bc.tests31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
index 21b2600..987461e 100755
--- a/testsuite/bc.tests
+++ b/testsuite/bc.tests
@@ -76,6 +76,37 @@ testing "bc print 1,2,3" \
"123" \
"" "print 1,2,3"
+testing "bc nested loops and breaks" \
+ "bc" \
+ "\
+11
+21
+31
+22
+12
+99
+" \
+ "" "\
+if(1) {
+ 11
+ while(1) {
+ 21
+ while(1) {
+ 31
+ break
+ 32
+ }
+ 22
+ break
+ 23
+ }
+ 12
+} else {
+ 88
+}
+99
+"
+
tar xJf bc_large.tar.xz
for f in bc*.bc; do