From 5f4b108731815990706dba00bce6f046af5e3dbe Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 3 May 2025 18:27:04 +0900 Subject: func call without args --- tests/014.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/014.sh (limited to 'tests') diff --git a/tests/014.sh b/tests/014.sh new file mode 100644 index 0000000..ba32d1f --- /dev/null +++ b/tests/014.sh @@ -0,0 +1,21 @@ +set -e + +bash ../../test_exit_code.sh 66 <<'EOF' +int foo() { + int i; + int ret; + i = 0; + ret = 0; + for (i = 0; i < 100; i = i + 1) { + if (i == 12) { + break; + } + ret = ret + i; + } + return ret; +} + +int main() { + return foo(); +} +EOF -- cgit v1.2.3-70-g09d2