summaryrefslogtreecommitdiffstats
path: root/lib/tests/test_ini.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/test_ini.c')
-rw-r--r--lib/tests/test_ini.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/tests/test_ini.c b/lib/tests/test_ini.c
index 80396ca..1ab1e5d 100644
--- a/lib/tests/test_ini.c
+++ b/lib/tests/test_ini.c
@@ -55,7 +55,7 @@ main (int argc, char **argv)
55{ 55{
56 char *optstr=NULL; 56 char *optstr=NULL;
57 57
58 plan_tests(12); 58 plan_tests(11);
59 59
60 optstr=list2str(np_get_defaults("section@./config-tiny.ini", "check_disk")); 60 optstr=list2str(np_get_defaults("section@./config-tiny.ini", "check_disk"));
61 ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "config-tiny.ini's section as expected"); 61 ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "config-tiny.ini's section as expected");
@@ -65,9 +65,13 @@ main (int argc, char **argv)
65 ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "Used default section name, without specific"); 65 ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "Used default section name, without specific");
66 my_free(optstr); 66 my_free(optstr);
67 67
68 optstr=list2str(np_get_defaults("section_unknown@./config-tiny.ini", "section")); 68 /*
69 ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "Used default section name over specified one"); 69 * This check is expected to die - It's commented so we can eventually put
70 my_free(optstr); 70 * it in a separate file for testing the return value
71 */
72 /* optstr=list2str(np_get_defaults("section_unknown@./config-tiny.ini", "section"));
73 ok( 0, "die if section isn't found");
74 my_free(optstr); */
71 75
72 optstr=list2str(np_get_defaults("Section Two@./config-tiny.ini", "check_disk")); 76 optstr=list2str(np_get_defaults("Section Two@./config-tiny.ini", "check_disk"));
73 ok( !strcmp(optstr, "--something else=blah --remove=whitespace"), "config-tiny.ini's Section Two as expected"); 77 ok( !strcmp(optstr, "--something else=blah --remove=whitespace"), "config-tiny.ini's Section Two as expected");