aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Riehs <tristan.riehs@inria.fr>2026-05-03 15:33:21 +0200
committerTristan Riehs <tristan.riehs@inria.fr>2026-05-03 15:33:21 +0200
commit3ab6ee96012c90e98725b6e7b51cb52284ee6828 (patch)
treec39a687ea440086e19737f35c204469987cce841
parent07c447e68a4a86697e5bcce9caeabc6c5f61cdbc (diff)
Strenghten the tests
For now, make check segfaults.
-rw-r--r--test/a.conf5
-rw-r--r--test/uconfig_test.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/test/a.conf b/test/a.conf
index f7d4f66..1488702 100644
--- a/test/a.conf
+++ b/test/a.conf
@@ -1,2 +1,5 @@
key0=value0
-key1=This is the value of key1
+key1 = value1 with spaces around the equal character
+ key 2 = value2 with spaces at the beginning of the line
+ key3 = value3 with a tab at the beginning of the line
+key4 = value4 with spaces at the end of the line
diff --git a/test/uconfig_test.c b/test/uconfig_test.c
index fdb5cab..b4f1001 100644
--- a/test/uconfig_test.c
+++ b/test/uconfig_test.c
@@ -9,7 +9,10 @@ int main(void)
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);
+ assert(strcmp(uconfig_get(uconfig, "key1"), "value1 with spaces around the equal character") == 0);
+ assert(strcmp(uconfig_get(uconfig, "key2"), "value2 with spaces at the beginning of the line") == 0);
+ assert(strcmp(uconfig_get(uconfig, "key3"), "value3 with a tab at the beginning of the line") == 0);
+ assert(strcmp(uconfig_get(uconfig, "key4"), "value4 with spaces at the end of the line") == 0);
uconfig_destroy(uconfig);
return 0;
}