[gdk-pixbuf: 5/7] gif: Add "Circular table entry" failing GIF image test case



commit 0b9d00413d9f31231af348e7761b98bb5501980d
Author: Robert Ancell <robert ancell canonical com>
Date:   Wed Dec 12 13:00:58 2018 +1300

    gif: Add "Circular table entry" failing GIF image test case
    
    An example image that generates the "Circular table entry in GIF file" error.

 tests/circular-table.gif          | Bin 0 -> 403644 bytes
 tests/meson.build                 |   1 +
 tests/pixbuf-gif-circular-table.c |  24 ++++++++++++++++++++++++
 3 files changed, 25 insertions(+)
---
diff --git a/tests/circular-table.gif b/tests/circular-table.gif
new file mode 100644
index 000000000..b893e7d6c
Binary files /dev/null and b/tests/circular-table.gif differ
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 ();
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]