tests: Fix test failures after library update

This commit is contained in:
Nik
2025-12-23 23:26:20 +01:00
committed by GitHub
parent 4646e4b965
commit 57c3dd44b8
2 changed files with 7 additions and 5 deletions

View File

@@ -98,12 +98,13 @@ int main(int argc, char **argv) {
if (missingComments)
return EXIT_FAILURE;
if (!runtime.executeString(patternFile.readString(), "<Source Code>")) {
auto exitCode = runtime.executeString(patternFile.readString(), "<Source Code>");
if (exitCode != 0) {
if (const auto &evalError = runtime.getEvalError(); evalError.has_value()) {
fmt::println("{}:{} {}", evalError->line, evalError->column, evalError->message);
}
return EXIT_FAILURE;
return exitCode;
}
if (!runtime.getPatterns().empty()) {