summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2024-05-05 17:30:59 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-05-05 17:51:34 +0200
commit11289898854dda5f6dbbfe99c62ed8c8aa3aae5f (patch)
tree5d620cb575f42d212b43356ce0c312063f53b024
parent01d815d95d6183656b068d616ee0d17a65472e14 (diff)
downloadmpv-11289898854dda5f6dbbfe99c62ed8c8aa3aae5f.tar.bz2
mpv-11289898854dda5f6dbbfe99c62ed8c8aa3aae5f.tar.xz
test: fflush between printf and abort
This is necessary to show the output with meson test. Followup to 06edb04692.
-rw-r--r--test/paths.c2
-rw-r--r--test/scale_test.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/test/paths.c b/test/paths.c
index aa610db437..90c1ddf94a 100644
--- a/test/paths.c
+++ b/test/paths.c
@@ -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();
}
}
diff --git a/test/scale_test.c b/test/scale_test.c
index 6e012712da..346fbfbda2 100644
--- a/test/scale_test.c
+++ b/test/scale_test.c
@@ -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();
}
}