From fc55b5f89b5974f627657c730bfd6b7d01609eae Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 11 Aug 2025 12:44:40 +0900 Subject: feat: allow variable declaration in for loop's init --- tests/087.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/087.sh (limited to 'tests') diff --git a/tests/087.sh b/tests/087.sh new file mode 100644 index 0000000..e662687 --- /dev/null +++ b/tests/087.sh @@ -0,0 +1,24 @@ +set -e + +cat <<'EOF' > expected +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +EOF + +bash ../../test_diff.sh <<'EOF' +int printf(); + +int main() { + for (int i = 0; i < 10; i++) { + printf("%d\n", i); + } +} +EOF -- cgit v1.2.3-70-g09d2