diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-05 14:24:34 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-05 14:24:34 +0900 |
| commit | 56f63bd9f6fc429f26b02bc7821c3a70e61cb89a (patch) | |
| tree | 8dbf11777fd5f71bb870939e89d90a53e855f019 /tests/041.sh | |
| parent | 92c78b77df593f4940f4594150571cf6ac64fc9c (diff) | |
| download | P4Dcc-56f63bd9f6fc429f26b02bc7821c3a70e61cb89a.tar.gz P4Dcc-56f63bd9f6fc429f26b02bc7821c3a70e61cb89a.tar.zst P4Dcc-56f63bd9f6fc429f26b02bc7821c3a70e61cb89a.zip | |
support compound assignment operators
Diffstat (limited to 'tests/041.sh')
| -rw-r--r-- | tests/041.sh | 32 |
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 |
