summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-12-19 00:31:43 -0500
committerMatthias Clasen <mclasen@redhat.com>2013-12-19 00:31:43 -0500
commit9a0a106a34e8df803773df5fd5b1ca1556f24984 (patch)
treebfb42503fd148417b78b09038f7972480285274a
parent902688a2be99baea02067a657ac19ffb884f41c6 (diff)
downloadgdk-pixbuf-9a0a106a34e8df803773df5fd5b1ca1556f24984.tar.gz
Add an xbm test
This tests that we correctly load a file with the .xbm extension using both gdk_pixbuf_new_from_file and gdk_pixbuf_new_from_file_at_scale.
-rw-r--r--tests/pixbuf-scale.c1
-rw-r--r--tests/test-images/valid.xbm10
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/pixbuf-scale.c b/tests/pixbuf-scale.c
index 1445b3ebd..4fd9fd5a4 100644
--- a/tests/pixbuf-scale.c
+++ b/tests/pixbuf-scale.c
@@ -71,6 +71,7 @@ main (int argc, char **argv)
g_test_add_data_func ("/pixbuf/scale/ras", "test-images/valid_ras_test", test_scale);
g_test_add_data_func ("/pixbuf/scale/tga", "test-images/valid_tga_test", test_scale);
g_test_add_data_func ("/pixbuf/scale/xpm", "test-images/valid_xpm_test", test_scale);
+ g_test_add_data_func ("/pixbuf/scale/xbm", "test-images/valid.xbm", test_scale);
return g_test_run ();
}
diff --git a/tests/test-images/valid.xbm b/tests/test-images/valid.xbm
new file mode 100644
index 000000000..c7df99300
--- /dev/null
+++ b/tests/test-images/valid.xbm
@@ -0,0 +1,10 @@
+#define valid_xbm_test_width 20
+#define valid_xbm_test_height 20
+#define valid_xbm_test_x_hot 10
+#define valid_xbm_test_y_hot 10
+static unsigned char valid_xbm_test_bits[] = {
+ 0x00, 0x00, 0x00, 0xea, 0xfb, 0x03, 0x2a, 0x2a, 0x02, 0xfa, 0xae, 0x03,
+ 0x82, 0x20, 0x00, 0xba, 0xbb, 0x03, 0x2a, 0x8a, 0x02, 0xae, 0xfb, 0x02,
+ 0xa0, 0x00, 0x02, 0xbe, 0xfa, 0x03, 0x82, 0x0a, 0x00, 0xfa, 0xfb, 0x03,
+ 0x02, 0x08, 0x02, 0xee, 0xab, 0x03, 0x28, 0xaa, 0x02, 0xba, 0xbb, 0x02,
+ 0x82, 0x80, 0x02, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };