From f1f01c0622a9045e26335f5715a42342d0191dcd Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 20:53:57 +0800 Subject: test(diagnostics): require accurate causes and source lines Check native and IR rejection without creating or replacing output files. Keep nine missing-location failures visible rather than accepting them. Co-Authored-By: Claude Fable 5.1 --- tests/iii/char-width/case.json | 8 ++++++++ tests/iii/char-width/notes.md | 5 +++++ tests/iii/char-width/program.cps | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 tests/iii/char-width/case.json create mode 100644 tests/iii/char-width/notes.md create mode 100644 tests/iii/char-width/program.cps (limited to 'tests/iii/char-width') diff --git a/tests/iii/char-width/case.json b/tests/iii/char-width/case.json new file mode 100644 index 0000000..5bf46ff --- /dev/null +++ b/tests/iii/char-width/case.json @@ -0,0 +1,8 @@ +{ + "errors": [ + { + "reason": "CHAR\\ literal\\ must\\ contain\\ exactly\\ one\\ character", + "line": 2 + } + ] +} diff --git a/tests/iii/char-width/notes.md b/tests/iii/char-width/notes.md new file mode 100644 index 0000000..e8d50ba --- /dev/null +++ b/tests/iii/char-width/notes.md @@ -0,0 +1,5 @@ +# char-width + +CIE p. 7 CHAR literal definition. + +Require exit 1, the stated cause and source line on the same diagnostic, exactly one compilation termination line, and preservation of absent/existing outputs for both native and IR requests. Missing block delimiters are located at EOF (the line after the final newline). diff --git a/tests/iii/char-width/program.cps b/tests/iii/char-width/program.cps new file mode 100644 index 0000000..f79602a --- /dev/null +++ b/tests/iii/char-width/program.cps @@ -0,0 +1,2 @@ +// CHAR contains exactly one character. +OUTPUT 'ab' -- cgit v1.3.1-4-g156e