1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From: Simon McVittie <smcv@debian.org>
Date: Tue, 16 Aug 2022 11:19:07 +0100
Subject: tests: Tolerate either CORRUPT_IMAGE or INSUFFICIENT_MEMORY for
issue 205
Workaround for https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/215
Forwarded: not-needed
---
tests/pixbuf-jpeg.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/pixbuf-jpeg.c b/tests/pixbuf-jpeg.c
index 7d0ff87..02b4648 100644
--- a/tests/pixbuf-jpeg.c
+++ b/tests/pixbuf-jpeg.c
@@ -202,10 +202,11 @@ test_jpeg_fbfbfbfb (void)
g_assert_no_error (error);
gdk_pixbuf_loader_close (loader, &error);
- g_assert_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE);
- pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- g_assert_nonnull (pixbuf);
+ if (error != NULL && error->domain == GDK_PIXBUF_ERROR && error->code == GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY)
+ g_test_message ("OK: failed reporting insufficient memory: %s", error->message);
+ else
+ g_assert_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE);
g_object_unref (loader);
g_free (contents);
|