aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/041.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/041.sh b/tests/041.sh
new file mode 100644
index 0000000..b4bb21e
--- /dev/null
+++ b/tests/041.sh
@@ -0,0 +1,32 @@
+set -e
+
+cat <<'EOF' > expected
+0
+1
+2
+3
+4
+
+5
+4
+3
+2
+1
+0
+EOF
+bash ../../test_diff.sh <<'EOF'
+int printf();
+
+int main() {
+ int i = 0;
+ for (; i < 5; i += 1) {
+ printf("%d\n", i);
+ }
+ printf("\n");
+ for (i = 5; i >= 0; i -= 1) {
+ printf("%d\n", i);
+ }
+
+ return 0;
+}
+EOF