aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-11 12:44:40 +0900
committernsfisis <nsfisis@gmail.com>2025-08-15 10:06:21 +0900
commitfc55b5f89b5974f627657c730bfd6b7d01609eae (patch)
treeb594b55bc00a71a0fb83b8e15bf959c1dfdeeb6f /tests
parentcf38ecdd3611efe138e24ea6b5b91c1861f36f31 (diff)
downloadducc-fc55b5f89b5974f627657c730bfd6b7d01609eae.tar.gz
ducc-fc55b5f89b5974f627657c730bfd6b7d01609eae.tar.zst
ducc-fc55b5f89b5974f627657c730bfd6b7d01609eae.zip
feat: allow variable declaration in for loop's init
Diffstat (limited to 'tests')
-rw-r--r--tests/087.sh24
1 files changed, 24 insertions, 0 deletions
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