From dd08b39ac5fc2eeb555bf40596279487fcea5f95 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 26 Aug 2025 21:57:09 +0900 Subject: feat: improve handling of non-directive preprocessing directives --- tests/083.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3-70-g09d2