1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 00:07:33 +00:00

test: fflush between printf and abort

This is necessary to show the output with meson test. Followup to
06edb04692.
This commit is contained in:
Guido Cella 2024-05-05 17:30:59 +02:00 committed by Kacper Michajłow
parent 01d815d95d
commit 1128989885
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ static void test_join(char *file, int line, char *a, char *b, char *c)
if (strcmp(res, c) != 0) {
printf("%s:%d: '%s' + '%s' = '%s', expected '%s'\n", file, line,
a, b, res, c);
fflush(stdout);
abort();
}
talloc_free(res);
@ -20,6 +21,7 @@ static void test_abs(char *file, int line, bool abs, char *a)
if (mp_path_is_absolute(bstr0(a)) != abs) {
printf("%s:%d: mp_path_is_absolute('%s') => %d, expected %d\n",
file, line, a, !abs, abs);
fflush(stdout);
abort();
}
}

View File

@ -62,6 +62,7 @@ static void dump_image(struct scale_test *stest, const char *name,
if (!write_image(img, &opts, path, NULL, NULL, true)) {
printf("Failed to write '%s'.\n", path);
fflush(stdout);
abort();
}
}