summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-04-02 12:45:10 +0100
committerEmmanuele Bassi <ebassi@gmail.com>2020-04-02 12:09:16 +0000
commit19eed7d3e34ddb18f23de1e44157f27b059cc8b6 (patch)
tree6b21f9a8f556b2654b8de332b8c30c99492c931c /tests
parente3adcf0c86dbd56b01d0d55f29a95065cbd95eb8 (diff)
downloadgdk-pixbuf-19eed7d3e34ddb18f23de1e44157f27b059cc8b6.tar.gz
tests: Skip tests when the ref format is unsupported
We must skip the reference test when both the source and reference files are unsupported.
Diffstat (limited to 'tests')
-rw-r--r--tests/pixbuf-reftest.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/pixbuf-reftest.c b/tests/pixbuf-reftest.c
index ac0bb2d46..b760a5e8c 100644
--- a/tests/pixbuf-reftest.c
+++ b/tests/pixbuf-reftest.c
@@ -148,8 +148,16 @@ test_reftest (gconstpointer data)
return;
}
- filename = g_file_get_path (file);
ref_file = make_ref_file (file);
+ if (!file_supported (ref_file))
+ {
+ g_test_skip ("format not supported for reference file");
+ return;
+ }
+
+ filename = g_file_get_path (file);
+
+ g_test_message ("Loading ref file '%s' for test file '%s'", g_file_peek_path (ref_file), filename);
stream = G_INPUT_STREAM (g_file_read (ref_file, NULL, &error));
g_assert_no_error (error);