summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2018-05-14 14:36:07 +0100
committerFrediano Ziglio <fziglio@redhat.com>2018-06-26 10:45:46 +0100
commit656106b30494fd3f0563790ae7f212fdcd52e01b (patch)
treee6f2982deae9e08c1f255c5278e39dd9d561c31b
parent258123318d26f88ffc8ac649155f6536e5503ba9 (diff)
test-quic: Allows to specify multiple images to test
Make easier to test an entire set of files Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-rw-r--r--tests/test-quic.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test-quic.c b/tests/test-quic.c
index 2a7ff3d..01a3ef3 100644
--- a/tests/test-quic.c
+++ b/tests/test-quic.c
@@ -232,12 +232,14 @@ static void test_pixbuf(GdkPixbuf *pixbuf)
int main(int argc, char **argv)
{
- if (argc == 2) {
- GdkPixbuf *source_pixbuf;
+ if (argc >= 2) {
+ for (int i = 1; i < argc; ++i) {
+ GdkPixbuf *source_pixbuf;
- source_pixbuf = gdk_pixbuf_new_from_file(argv[1], NULL);
- test_pixbuf(source_pixbuf);
- g_object_unref(source_pixbuf);
+ source_pixbuf = gdk_pixbuf_new_from_file(argv[i], NULL);
+ test_pixbuf(source_pixbuf);
+ g_object_unref(source_pixbuf);
+ }
} else if (argc == 1) {
unsigned int count;