aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-26 21:57:09 +0900
committernsfisis <nsfisis@gmail.com>2025-08-26 21:57:09 +0900
commitdd08b39ac5fc2eeb555bf40596279487fcea5f95 (patch)
tree859e4c45cc783f9fd9e29a5968f3964c04d5fb1f /tests
parenta70bc7804c4c1cb07976d684b64b5a2fe3b68f93 (diff)
downloadducc-dd08b39ac5fc2eeb555bf40596279487fcea5f95.tar.gz
ducc-dd08b39ac5fc2eeb555bf40596279487fcea5f95.tar.zst
ducc-dd08b39ac5fc2eeb555bf40596279487fcea5f95.zip
feat: improve handling of non-directive preprocessing directives
Diffstat (limited to 'tests')
-rw-r--r--tests/083.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/083.sh b/tests/083.sh
index 64d03e5..2152666 100644
--- a/tests/083.sh
+++ b/tests/083.sh
@@ -1,7 +1,6 @@
cat <<'EOF' > expected
-main.c:1: unknown preprocessor directive (foo)
+main.c:1: invalid preprocessing directive, '#foo'
EOF
-
test_compile_error <<'EOF'
#foo
@@ -9,11 +8,20 @@ int main() {}
EOF
cat <<'EOF' > expected
-main.c:1: unknown preprocessor directive (bar)
+main.c:1: invalid preprocessing directive, '#bar'
EOF
-
test_compile_error <<'EOF'
# bar 1 2 3
int main() {}
EOF
+
+cat <<'EOF' > expected
+EOF
+test_diff <<'EOF'
+#if 0
+#baz
+#endif
+
+int main() {}
+EOF