diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2018-12-12 13:00:58 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2019-01-16 15:47:09 +1300 |
commit | 0b9d00413d9f31231af348e7761b98bb5501980d (patch) | |
tree | 7c2b9b7d6d585a087436d5ab65ab84a0014f9d6c | |
parent | 88ceed9ed1e823ffd797df798d429d15bc7efd39 (diff) | |
download | gdk-pixbuf-0b9d00413d9f31231af348e7761b98bb5501980d.tar.gz |
gif: Add "Circular table entry" failing GIF image test case
An example image that generates the "Circular table entry in GIF file" error.
-rw-r--r-- | tests/circular-table.gif | bin | 0 -> 403644 bytes | |||
-rw-r--r-- | tests/meson.build | 1 | ||||
-rw-r--r-- | tests/pixbuf-gif-circular-table.c | 24 |
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/circular-table.gif b/tests/circular-table.gif Binary files differnew file mode 100644 index 000000000..b893e7d6c --- /dev/null +++ b/tests/circular-table.gif diff --git a/tests/meson.build b/tests/meson.build index b7f9bc45c..aaa1817e7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -64,6 +64,7 @@ installed_tests = [ [ 'pixbuf-scale', ['ops'], ], [ 'pixbuf-scale-two-step', ['ops'], ], [ 'pixbuf-short-gif-write', ['format'], ], + [ 'pixbuf-gif-circular-table', ['format'], ], [ 'pixbuf-save', ['io'] ], [ 'pixbuf-readonly-to-mutable', ['conform'], ], [ 'pixbuf-composite', ['ops'], ], diff --git a/tests/pixbuf-gif-circular-table.c b/tests/pixbuf-gif-circular-table.c new file mode 100644 index 000000000..a1ce15f9f --- /dev/null +++ b/tests/pixbuf-gif-circular-table.c @@ -0,0 +1,24 @@ +#include "config.h" +#include "gdk-pixbuf/gdk-pixbuf.h" +#include <glib.h> + +static void +test_gif_circular_table (void) +{ + GdkPixbuf *pixbuf; + GError *error = NULL; + + pixbuf = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "circular-table.gif", NULL), &error); + g_assert_no_error (error); + + g_object_unref (pixbuf); +} + +int main (int argc, char *argv[]) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/pixbuf/gif/circular-table", test_gif_circular_table); + + return g_test_run (); +} |