diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/088.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/088.sh b/tests/088.sh new file mode 100644 index 0000000..6630cf0 --- /dev/null +++ b/tests/088.sh @@ -0,0 +1,35 @@ +set -e + +cat <<'EOF' > expected +0 +1 +2 +3 +4 +0 +1 +2 +3 +4 +43 +42 +EOF + +bash ../../test_diff.sh <<'EOF' +int printf(); + +int main() { + for (int i = 0; i < 5; i++) { + printf("%d\n", i); + } + for (int i = 0; i < 5; i++) { + printf("%d\n", i); + } + int x = 42; + { + int x = 43; + printf("%d\n", x); + } + printf("%d\n", x); +} +EOF |
