Add "gif-pixel-data-none" test
diff --git a/test/c/std/gif.c b/test/c/std/gif.c
index dbd0284..453e6b5 100644
--- a/test/c/std/gif.c
+++ b/test/c/std/gif.c
@@ -1019,6 +1019,23 @@
return NULL;
}
+const char* test_wuffs_gif_decode_pixel_data_none() {
+ CHECK_FOCUS(__func__);
+
+ wuffs_base__io_buffer src = ((wuffs_base__io_buffer){
+ .data = global_src_slice,
+ });
+
+ const char* status =
+ read_file(&src, "test/data/artificial/gif-pixel-data-none.gif");
+ if (status) {
+ return status;
+ }
+
+ return do_test_wuffs_gif_decode_expecting(
+ src, wuffs_base__error__not_enough_data, true);
+}
+
const char* test_wuffs_gif_decode_not_enough_data() {
CHECK_FOCUS(__func__);
@@ -1669,6 +1686,7 @@
test_wuffs_gif_decode_input_is_a_png, //
test_wuffs_gif_decode_missing_two_src_bytes, //
test_wuffs_gif_decode_multiple_loop_counts, //
+ test_wuffs_gif_decode_pixel_data_none, //
test_wuffs_gif_decode_not_enough_data, //
test_wuffs_gif_decode_too_much_data, //
test_wuffs_gif_frame_dirty_rect, //
diff --git a/test/data/artificial/gif-pixel-data-none.gif b/test/data/artificial/gif-pixel-data-none.gif
new file mode 100644
index 0000000..0227f9d
--- /dev/null
+++ b/test/data/artificial/gif-pixel-data-none.gif
Binary files differ
diff --git a/test/data/artificial/gif-pixel-data-none.gif.make-artificial.txt b/test/data/artificial/gif-pixel-data-none.gif.make-artificial.txt
new file mode 100644
index 0000000..9dc0eef
--- /dev/null
+++ b/test/data/artificial/gif-pixel-data-none.gif.make-artificial.txt
@@ -0,0 +1,23 @@
+# Feed this file to script/make-artificial.go
+
+make gif
+
+header
+
+image {
+ imageWidthHeight 2 2
+ palette {
+ 0x00 0x00 0xFF
+ 0x11 0x00 0xFF
+ 0x22 0x00 0xFF
+ 0x33 0x00 0xFF
+ }
+}
+
+frame {
+ frameLeftTopWidthHeight 0 0 2 2
+}
+# The frame is 4 pixels, but we don't supply any.
+lzw 2
+
+trailer