From 4aca87515a5083ae0e31ce3177189fd43b6d05ac Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 3 Jan 2015 13:58:15 +0100 Subject: patch to Vanilla Tomato 1.28 --- .../shell/ash_test/ash-arith/arith-for.right | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 release/src/router/busybox/shell/ash_test/ash-arith/arith-for.right (limited to 'release/src/router/busybox/shell/ash_test/ash-arith/arith-for.right') diff --git a/release/src/router/busybox/shell/ash_test/ash-arith/arith-for.right b/release/src/router/busybox/shell/ash_test/ash-arith/arith-for.right new file mode 100644 index 00000000..88dbc15f --- /dev/null +++ b/release/src/router/busybox/shell/ash_test/ash-arith/arith-for.right @@ -0,0 +1,74 @@ +0 +1 +2 +0 +1 +2 +0 +1 +2 +0 +2 +4 +fx is a function +fx () +{ + i=0; + for ((1; i < 3; i++ )) + do + echo $i; + done; + for ((i=0; 1; i++ )) + do + if (( i >= 3 )); then + break; + fi; + echo $i; + done; + for ((i=0; i<3; 1)) + do + echo $i; + (( i++ )); + done; + i=0; + for ((1; 1; 1)) + do + if (( i > 2 )); then + break; + fi; + echo $i; + (( i++ )); + done; + i=0; + for ((1; 1; 1)) + do + if (( i > 2 )); then + break; + fi; + echo $i; + (( i++ )); + done +} +0 +1 +2 +0 +1 +2 +0 +1 +2 +0 +1 +2 +0 +1 +2 +./arith-for.tests: line 77: syntax error: arithmetic expression required +./arith-for.tests: line 77: syntax error: `(( i=0; "i < 3" ))' +2 +./arith-for.tests: line 83: syntax error: `;' unexpected +./arith-for.tests: line 83: syntax error: `(( i=0; i < 3; i++; 7 ))' +2 +20 +20 -- cgit v1.2.3-54-g00ecf