diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-25 21:47:16 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-25 21:47:16 +0100 |
commit | 024cf2f59a7ee23f46140932b7b617f1f3fc1508 (patch) | |
tree | 0a2203ffa897b652f75eaefa14ea066774b63b55 /test-netservice.c | |
parent | readme: list optional dependencies + update todo (diff) | |
download | libgeome-024cf2f59a7ee23f46140932b7b617f1f3fc1508.tar.gz libgeome-024cf2f59a7ee23f46140932b7b617f1f3fc1508.tar.bz2 libgeome-024cf2f59a7ee23f46140932b7b617f1f3fc1508.tar.xz |
Add tests and some fixes1.0
Signed-off-by: Mattias Andrée <m@maandree.se>
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; +} |