diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/pixbuf-randomly-modified.c | 20 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.1.bmp (renamed from tests/test-images/randomly-modified/invalid.1.bmp) | bin | 6966 -> 6966 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.1.gif (renamed from tests/test-images/randomly-modified/invalid.1.gif) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.1.ico (renamed from tests/test-images/randomly-modified/invalid.1.ico) | bin | 318 -> 318 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.1.png (renamed from tests/test-images/randomly-modified/invalid.1.png) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.1.ppm (renamed from tests/test-images/randomly-modified/invalid.1.ppm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.1.tga (renamed from tests/test-images/randomly-modified/invalid.1.tga) | bin | 23679 -> 23679 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.1.xpm (renamed from tests/test-images/randomly-modified/invalid.1.xpm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.2.gif (renamed from tests/test-images/randomly-modified/invalid.2.gif) | bin | 562 -> 562 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.2.ico (renamed from tests/test-images/randomly-modified/invalid.2.ico) | bin | 318 -> 318 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.2.png (renamed from tests/test-images/randomly-modified/invalid.2.png) | bin | 2755 -> 2755 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.2.ppm (renamed from tests/test-images/randomly-modified/invalid.2.ppm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.3.gif (renamed from tests/test-images/randomly-modified/invalid.3.gif) | bin | 318 -> 318 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.3.ico (renamed from tests/test-images/randomly-modified/invalid.3.ico) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.3.png (renamed from tests/test-images/randomly-modified/invalid.3.png) | bin | 64 -> 64 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.3.ppm (renamed from tests/test-images/randomly-modified/invalid.3.ppm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.4.gif (renamed from tests/test-images/randomly-modified/invalid.4.gif) | bin | 310 -> 310 bytes | |||
-rw-r--r-- | tests/test-images/fail/invalid.4.png (renamed from tests/test-images/randomly-modified/invalid.4.png) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.4.ppm (renamed from tests/test-images/randomly-modified/invalid.4.ppm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.5.ppm (renamed from tests/test-images/randomly-modified/invalid.5.ppm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.6.ppm (renamed from tests/test-images/randomly-modified/invalid.6.ppm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.7.ppm (renamed from tests/test-images/randomly-modified/invalid.7.ppm) | 0 | ||||
-rw-r--r-- | tests/test-images/fail/invalid.8.ppm (renamed from tests/test-images/randomly-modified/invalid.8.ppm) | 0 |
24 files changed, 15 insertions, 6 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 833c73a73..ed1c25c23 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -58,6 +58,7 @@ dist_installed_test_data = \ cve-2015-4491.bmp \ large.png \ large.jpg \ + $(wildcard $(srcdir)/test-images/fail/*) \ $(wildcard $(srcdir)/test-images/randomly-modified/*) \ $(wildcard $(srcdir)/test-images/reftest/tga/*) \ $(NULL) diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c index 2c905c3e1..427bed736 100644 --- a/tests/pixbuf-randomly-modified.c +++ b/tests/pixbuf-randomly-modified.c @@ -89,8 +89,8 @@ test_randomly_modified (gconstpointer data) int main (int argc, char **argv) { - gchar *test_images_dir; - GFile *test_images; + gchar *base_dir; + GFile *base, *test_images; #ifdef HAVE_SETRLIMIT struct rlimit max_mem_size; @@ -101,11 +101,19 @@ main (int argc, char **argv) g_test_init (&argc, &argv, NULL); - test_images_dir = g_build_filename (g_test_get_dir (G_TEST_DIST), "test-images/randomly-modified", NULL); - test_images = g_file_new_for_path (test_images_dir); - add_test_for_all_images ("/pixbuf/randomly-modified", test_images, test_images, test_randomly_modified, NULL); + base_dir = g_build_filename (g_test_get_dir (G_TEST_DIST), "test-images", NULL); + base = g_file_new_for_path (base_dir); + + test_images = g_file_get_child (base, "randomly-modified"); + add_test_for_all_images ("/pixbuf", base, test_images, test_randomly_modified, NULL); + g_object_unref (test_images); + + test_images = g_file_get_child (base, "fail"); + add_test_for_all_images ("/pixbuf/randomly-modified", base, test_images, test_randomly_modified, NULL); g_object_unref (test_images); - g_free (test_images_dir); + + g_object_unref (base); + g_free (base_dir); g_test_message ("Modified image is written to pixbuf-randomly-modified-image"); diff --git a/tests/test-images/randomly-modified/invalid.1.bmp b/tests/test-images/fail/invalid.1.bmp Binary files differindex 1496303ac..1496303ac 100644 --- a/tests/test-images/randomly-modified/invalid.1.bmp +++ b/tests/test-images/fail/invalid.1.bmp diff --git a/tests/test-images/randomly-modified/invalid.1.gif b/tests/test-images/fail/invalid.1.gif index ab36331f9..ab36331f9 100644 --- a/tests/test-images/randomly-modified/invalid.1.gif +++ b/tests/test-images/fail/invalid.1.gif diff --git a/tests/test-images/randomly-modified/invalid.1.ico b/tests/test-images/fail/invalid.1.ico Binary files differindex 2994b7d69..2994b7d69 100644 --- a/tests/test-images/randomly-modified/invalid.1.ico +++ b/tests/test-images/fail/invalid.1.ico diff --git a/tests/test-images/randomly-modified/invalid.1.png b/tests/test-images/fail/invalid.1.png index 6f2781a55..6f2781a55 100644 --- a/tests/test-images/randomly-modified/invalid.1.png +++ b/tests/test-images/fail/invalid.1.png diff --git a/tests/test-images/randomly-modified/invalid.1.ppm b/tests/test-images/fail/invalid.1.ppm index a1689c50c..a1689c50c 100644 --- a/tests/test-images/randomly-modified/invalid.1.ppm +++ b/tests/test-images/fail/invalid.1.ppm diff --git a/tests/test-images/randomly-modified/invalid.1.tga b/tests/test-images/fail/invalid.1.tga Binary files differindex 28b911ed4..28b911ed4 100644 --- a/tests/test-images/randomly-modified/invalid.1.tga +++ b/tests/test-images/fail/invalid.1.tga diff --git a/tests/test-images/randomly-modified/invalid.1.xpm b/tests/test-images/fail/invalid.1.xpm index ae38b7481..ae38b7481 100644 --- a/tests/test-images/randomly-modified/invalid.1.xpm +++ b/tests/test-images/fail/invalid.1.xpm diff --git a/tests/test-images/randomly-modified/invalid.2.gif b/tests/test-images/fail/invalid.2.gif Binary files differindex 90ced1408..90ced1408 100644 --- a/tests/test-images/randomly-modified/invalid.2.gif +++ b/tests/test-images/fail/invalid.2.gif diff --git a/tests/test-images/randomly-modified/invalid.2.ico b/tests/test-images/fail/invalid.2.ico Binary files differindex 10c7542dc..10c7542dc 100644 --- a/tests/test-images/randomly-modified/invalid.2.ico +++ b/tests/test-images/fail/invalid.2.ico diff --git a/tests/test-images/randomly-modified/invalid.2.png b/tests/test-images/fail/invalid.2.png Binary files differindex 1b8b0978c..1b8b0978c 100644 --- a/tests/test-images/randomly-modified/invalid.2.png +++ b/tests/test-images/fail/invalid.2.png diff --git a/tests/test-images/randomly-modified/invalid.2.ppm b/tests/test-images/fail/invalid.2.ppm index c62bd18e4..c62bd18e4 100644 --- a/tests/test-images/randomly-modified/invalid.2.ppm +++ b/tests/test-images/fail/invalid.2.ppm diff --git a/tests/test-images/randomly-modified/invalid.3.gif b/tests/test-images/fail/invalid.3.gif Binary files differindex d69c80361..d69c80361 100644 --- a/tests/test-images/randomly-modified/invalid.3.gif +++ b/tests/test-images/fail/invalid.3.gif diff --git a/tests/test-images/randomly-modified/invalid.3.ico b/tests/test-images/fail/invalid.3.ico index 631273df4..631273df4 100644 --- a/tests/test-images/randomly-modified/invalid.3.ico +++ b/tests/test-images/fail/invalid.3.ico diff --git a/tests/test-images/randomly-modified/invalid.3.png b/tests/test-images/fail/invalid.3.png Binary files differindex a335aa9c9..a335aa9c9 100644 --- a/tests/test-images/randomly-modified/invalid.3.png +++ b/tests/test-images/fail/invalid.3.png diff --git a/tests/test-images/randomly-modified/invalid.3.ppm b/tests/test-images/fail/invalid.3.ppm index 62395eb26..62395eb26 100644 --- a/tests/test-images/randomly-modified/invalid.3.ppm +++ b/tests/test-images/fail/invalid.3.ppm diff --git a/tests/test-images/randomly-modified/invalid.4.gif b/tests/test-images/fail/invalid.4.gif Binary files differindex b2e4fbecc..b2e4fbecc 100644 --- a/tests/test-images/randomly-modified/invalid.4.gif +++ b/tests/test-images/fail/invalid.4.gif diff --git a/tests/test-images/randomly-modified/invalid.4.png b/tests/test-images/fail/invalid.4.png index 7239470c8..7239470c8 100644 --- a/tests/test-images/randomly-modified/invalid.4.png +++ b/tests/test-images/fail/invalid.4.png diff --git a/tests/test-images/randomly-modified/invalid.4.ppm b/tests/test-images/fail/invalid.4.ppm index 0f6e6b5d3..0f6e6b5d3 100644 --- a/tests/test-images/randomly-modified/invalid.4.ppm +++ b/tests/test-images/fail/invalid.4.ppm diff --git a/tests/test-images/randomly-modified/invalid.5.ppm b/tests/test-images/fail/invalid.5.ppm index 46b08743a..46b08743a 100644 --- a/tests/test-images/randomly-modified/invalid.5.ppm +++ b/tests/test-images/fail/invalid.5.ppm diff --git a/tests/test-images/randomly-modified/invalid.6.ppm b/tests/test-images/fail/invalid.6.ppm index 673d59e9a..673d59e9a 100644 --- a/tests/test-images/randomly-modified/invalid.6.ppm +++ b/tests/test-images/fail/invalid.6.ppm diff --git a/tests/test-images/randomly-modified/invalid.7.ppm b/tests/test-images/fail/invalid.7.ppm index 21005c974..21005c974 100644 --- a/tests/test-images/randomly-modified/invalid.7.ppm +++ b/tests/test-images/fail/invalid.7.ppm diff --git a/tests/test-images/randomly-modified/invalid.8.ppm b/tests/test-images/fail/invalid.8.ppm index cb03363d8..cb03363d8 100644 --- a/tests/test-images/randomly-modified/invalid.8.ppm +++ b/tests/test-images/fail/invalid.8.ppm |