Mon, 01 Apr 2019 00:19:25 -0400
sametime: Move test image to a separate header.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/protocols/sametime/tests/data/image-data.h Mon Apr 01 00:19:25 2019 -0400 @@ -0,0 +1,24 @@ +// generated via: +// $ cat test-image.png | hexdump -v -e '1 1 "0x%02x," " "' | xargs -n 8 echo +static const guint8 test_image_data[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, + 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, + 0x08, 0x02, 0x00, 0x00, 0x00, 0xfd, 0xd4, 0x9a, + 0x73, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, + 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, + 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, + 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xe0, + 0x0a, 0x02, 0x16, 0x30, 0x22, 0x28, 0xa4, 0xc9, + 0xdd, 0x00, 0x00, 0x00, 0x1d, 0x69, 0x54, 0x58, + 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, + 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x64, 0x2e, + 0x65, 0x07, 0x00, 0x00, 0x00, 0x16, 0x49, 0x44, + 0x41, 0x54, 0x08, 0xd7, 0x63, 0xf8, 0xff, 0xff, + 0x3f, 0x03, 0x03, 0x03, 0xe3, 0xb3, 0x4c, 0xb5, + 0x9b, 0x4e, 0x0b, 0x00, 0x2f, 0xa9, 0x06, 0x2f, + 0x8a, 0xd1, 0xc6, 0xb3, 0x00, 0x00, 0x00, 0x00, + 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +};
--- a/libpurple/protocols/sametime/tests/test_sametime_im_mime.c Sun Mar 31 21:41:52 2019 -0400 +++ b/libpurple/protocols/sametime/tests/test_sametime_im_mime.c Mon Apr 01 00:19:25 2019 -0400 @@ -48,30 +48,8 @@ #include "data/mime-utf8.h" }; -// generated via: -// $ cat test-image.png | hexdump -v -e '1 1 "0x%02x," " "' | xargs -n 8 echo -static const guint8 test_image_data[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, - 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, - 0x08, 0x02, 0x00, 0x00, 0x00, 0xfd, 0xd4, 0x9a, - 0x73, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, - 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, - 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, - 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xe0, - 0x0a, 0x02, 0x16, 0x30, 0x22, 0x28, 0xa4, 0xc9, - 0xdd, 0x00, 0x00, 0x00, 0x1d, 0x69, 0x54, 0x58, - 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, - 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x64, 0x2e, - 0x65, 0x07, 0x00, 0x00, 0x00, 0x16, 0x49, 0x44, - 0x41, 0x54, 0x08, 0xd7, 0x63, 0xf8, 0xff, 0xff, - 0x3f, 0x03, 0x03, 0x03, 0xe3, 0xb3, 0x4c, 0xb5, - 0x9b, 0x4e, 0x0b, 0x00, 0x2f, 0xa9, 0x06, 0x2f, - 0x8a, 0xd1, 0xc6, 0xb3, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -}; +// Image data to use for tests: +#include "data/image-data.h" static void