aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-04 21:42:26 +0900
committernsfisis <nsfisis@gmail.com>2025-05-04 21:43:26 +0900
commit8047c8beca7a5d04c206cf5ffc3eea9ba1e33f10 (patch)
tree818943f0361f6049d23b9600a35684876f163e67 /tests
parent3bfcc240c7c68fd3aff8535df4e9e8e384eb9205 (diff)
downloadP4Dcc-8047c8beca7a5d04c206cf5ffc3eea9ba1e33f10.tar.gz
P4Dcc-8047c8beca7a5d04c206cf5ffc3eea9ba1e33f10.tar.zst
P4Dcc-8047c8beca7a5d04c206cf5ffc3eea9ba1e33f10.zip
support return stmt without result
Diffstat (limited to 'tests')
-rw-r--r--tests/037.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/037.sh b/tests/037.sh
new file mode 100644
index 0000000..bc6867b
--- /dev/null
+++ b/tests/037.sh
@@ -0,0 +1,18 @@
+set -e
+
+cat <<'EOF' > expected
+hi
+EOF
+bash ../../test_diff.sh <<'EOF'
+int printf();
+
+void f() {
+ printf("hi\n");
+ return;
+}
+
+int main() {
+ f();
+ return 0;
+}
+EOF