aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-03 18:27:04 +0900
committernsfisis <nsfisis@gmail.com>2025-05-03 18:40:59 +0900
commit5f4b108731815990706dba00bce6f046af5e3dbe (patch)
tree0e03912b7fea712a39acce99e36403720ffc04f7 /tests
parent5e630e9d34f082c5737cf61aa103b1db3c1ed6e8 (diff)
downloadP4Dcc-5f4b108731815990706dba00bce6f046af5e3dbe.tar.gz
P4Dcc-5f4b108731815990706dba00bce6f046af5e3dbe.tar.zst
P4Dcc-5f4b108731815990706dba00bce6f046af5e3dbe.zip
func call without args
Diffstat (limited to 'tests')
-rw-r--r--tests/014.sh21
1 files changed, 21 insertions, 0 deletions
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