From 0c41b30e1534e4e23a1ff15eca50247579071d83 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 26 Apr 2026 16:57:47 +0200 Subject: Yet another project that will likely never be used by anyone --- test/uconfig_test.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/uconfig_test.c (limited to 'test/uconfig_test.c') diff --git a/test/uconfig_test.c b/test/uconfig_test.c new file mode 100644 index 0000000..fdb5cab --- /dev/null +++ b/test/uconfig_test.c @@ -0,0 +1,15 @@ +#include +#include +#include + +int main(void) +{ + struct uconfig_s *uconfig = uconfig_new("a.conf"); + if (uconfig == NULL) + uconfig = uconfig_new("./test/a.conf"); + assert(uconfig != NULL); + assert(strcmp(uconfig_get(uconfig, "key0"), "value0") == 0); + assert(strcmp(uconfig_get(uconfig, "key1"), "This is the value of key1") == 0); + uconfig_destroy(uconfig); + return 0; +} -- cgit v1.2.3