mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-05 09:36:52 +00:00
Flush stdout in chat template before potential crash
This commit is contained in:
@@ -291,6 +291,7 @@ int main(void) {
|
|||||||
printf("Expected:\n%s\n", test_case.expected_output.c_str());
|
printf("Expected:\n%s\n", test_case.expected_output.c_str());
|
||||||
printf("-------------------------\n");
|
printf("-------------------------\n");
|
||||||
printf("Actual:\n%s\n", output.c_str());
|
printf("Actual:\n%s\n", output.c_str());
|
||||||
|
fflush(stdout);
|
||||||
assert(output == test_case.expected_output);
|
assert(output == test_case.expected_output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -315,6 +316,7 @@ int main(void) {
|
|||||||
printf("Expected:\n%s\n", expected_output.c_str());
|
printf("Expected:\n%s\n", expected_output.c_str());
|
||||||
printf("-------------------------\n");
|
printf("-------------------------\n");
|
||||||
printf("Actual:\n%s\n", output.c_str());
|
printf("Actual:\n%s\n", output.c_str());
|
||||||
|
fflush(stdout);
|
||||||
assert(output == expected_output);
|
assert(output == expected_output);
|
||||||
}
|
}
|
||||||
} catch (const std::exception & e) {
|
} catch (const std::exception & e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user