diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-12-05 02:23:42 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-12-05 06:42:10 +0100 |
commit | 73855e7e033143343d1c07e413951f7ba062b9df (patch) | |
tree | bf529541aff6316719adce2251a93951d0309e1a /tests | |
parent | 1b92a2dc1a4e59f4ae4ea5cd79a81a4ea023578e (diff) | |
download | gdk-pixbuf-73855e7e033143343d1c07e413951f7ba062b9df.tar.gz |
tests: Add test for bug 753605
https://bugzilla.gnome.org/show_bug.cgi?id=753605
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bug753605-atsize.jpg | bin | 0 -> 80850 bytes | |||
-rw-r--r-- | tests/pixbuf-jpeg.c | 23 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/bug753605-atsize.jpg b/tests/bug753605-atsize.jpg Binary files differnew file mode 100644 index 000000000..648c08b14 --- /dev/null +++ b/tests/bug753605-atsize.jpg diff --git a/tests/pixbuf-jpeg.c b/tests/pixbuf-jpeg.c index ea1d62eae..d03384e42 100644 --- a/tests/pixbuf-jpeg.c +++ b/tests/pixbuf-jpeg.c @@ -115,6 +115,28 @@ test_comment(void) g_object_unref (ref); } +static void +test_at_size (void) +{ + GError *error = NULL; + GdkPixbuf *ref; + + if (!format_supported ("jpeg") || !format_supported ("png")) + { + g_test_skip ("format not supported"); + return; + } + + ref = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "bug753605-atsize.jpg", NULL), &error); + g_assert_no_error (error); + g_object_unref (ref); + + ref = gdk_pixbuf_new_from_file_at_size (g_test_get_filename (G_TEST_DIST, "bug753605-atsize.jpg", NULL), + 50, 50, &error); + g_assert_no_error (error); + g_object_unref (ref); +} + int main (int argc, char **argv) { @@ -124,6 +146,7 @@ main (int argc, char **argv) g_test_add_func ("/pixbuf/jpeg/type9_rotation_exif_tag", test_type9_rotation_exif_tag); g_test_add_func ("/pixbuf/jpeg/bug775218", test_bug_775218); g_test_add_func ("/pixbuf/jpeg/comment", test_comment); + g_test_add_func ("/pixbuf/jpeg/at_size", test_at_size); return g_test_run (); } |