Introduce golden file mechanism for tests

This commit is contained in:
2026-04-24 21:09:47 +02:00
parent 9ca72ef5bf
commit a89e61eedd
9 changed files with 66 additions and 24 deletions
+1 -6
View File
@@ -86,12 +86,7 @@ static void test_tokenstream_unknown_token(void) {
if (tokenstream_next(ts).token != TOKEN_UNKNOWN) fail("expected TOKEN_UNKNOWN");
assert_log(
"--- test.c ---\n"
"1| %\n"
" ^\n"
" unexpected token '%'\n",
"expected error message for unknown token");
assert_log_file("v0/tests/unknown_token.txt", "expected error message for unknown token");
tokenstream_close(ts);
}