aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/for_loops.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/for_loops.sh')
-rw-r--r--tests/for_loops.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/for_loops.sh b/tests/for_loops.sh
index 2e3205f..ef54d06 100644
--- a/tests/for_loops.sh
+++ b/tests/for_loops.sh
@@ -139,3 +139,20 @@ int main() {
}
EOF
+cat <<'EOF' > expected
+0 1
+1 3
+2 5
+3 7
+4 9
+EOF
+
+test_diff <<'EOF'
+int printf();
+
+int main() {
+ for (int i = 0, j = 1; i < 5; i++, j += 2) {
+ printf("%d %d\n", i, j);
+ }
+}
+EOF