blob: fdb5cab1a122d12fdcc609f7d30b1a83493996d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <assert.h>
#include <string.h>
#include <uconfig.h>
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;
}
|