diff options
Diffstat (limited to 'test-netservice.c')
-rw-r--r-- | test-netservice.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test-netservice.c b/test-netservice.c new file mode 100644 index 0000000..dd31ce8 --- /dev/null +++ b/test-netservice.c @@ -0,0 +1,33 @@ +/* See LICENSE file for copyright and license details. */ +#include "test-common.h" + + +int +main(int argc, char *argv[]) +{ + struct libgeome_context ctx; + struct libgeome_data data; + size_t i, j; + int ret = 1; + + if (argc != 1) { + fprintf(stderr, "usage: %s", argv[0]); + return 1; + } + + test_common_init(&ctx, &data, argv[0]); + + for (i = 0; i < libgeome_netservices_count; i++) { + if (i) + printf("\n"); + printf("Running:"); + for (j = 0; libgeome_netservices[i].args[j]; j++) + printf(" %s", libgeome_netservices[i].args[j]); + printf("\n"); + if (!libgeome_get_from_netservice(&ctx, &data, &libgeome_netservices[i])) { + ret = 0; + test_common_print(&data); + } + } + return ret; +} |