From a5ee9d944edf665c814bbfeded2849f2bb980ed8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 31 Aug 2025 00:11:36 +0900 Subject: fix: error message when included file is not found --- tests/057.sh | 2 +- tests/059.sh | 2 +- tests/110.sh | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 tests/110.sh (limited to 'tests') diff --git a/tests/057.sh b/tests/057.sh index 291030c..3649588 100644 --- a/tests/057.sh +++ b/tests/057.sh @@ -1,5 +1,5 @@ cat <<'EOF' > expected -cannot open include file: ./nonexistent.h +main.c:1: cannot open include file: "nonexistent.h" EOF test_compile_error <<'EOF' diff --git a/tests/059.sh b/tests/059.sh index 189ff5e..a7b92d0 100644 --- a/tests/059.sh +++ b/tests/059.sh @@ -7,7 +7,7 @@ int main() } EOF cat <<'EOF' > expected -main.c:1: expected '{', but got '123 ()' +main.c:1: expected '{', but got '123' EOF test_compile_error <<'EOF' diff --git a/tests/110.sh b/tests/110.sh new file mode 100644 index 0000000..4d48752 --- /dev/null +++ b/tests/110.sh @@ -0,0 +1,15 @@ +cat <<'EOF' > expected +main.c:1: cannot open include file: "hoge.h" +EOF + +test_compile_error <<'EOF' +#include "hoge.h" +EOF + +cat <<'EOF' > expected +main.c:1: cannot resolve include file name: +EOF + +test_compile_error <<'EOF' +#include +EOF -- cgit v1.2.3-70-g09d2