Code

Remove the commented out blocks
authorThomas Guyot-Sionnest <dermoth@aei.ca>
Sat, 24 Jan 2009 12:41:45 +0000 (07:41 -0500)
committerThomas Guyot-Sionnest <dermoth@aei.ca>
Sat, 24 Jan 2009 12:41:45 +0000 (07:41 -0500)
The die tests are implemented in the test_*3.t files

lib/tests/test_ini1.c
lib/tests/test_opts1.c

index c0853d7c5c40f4bfa2d9f6e9b4012472577ca3e3..77f88549a29f06fc75fbb9bd20f987c5e238c05b 100644 (file)
@@ -64,14 +64,6 @@ main (int argc, char **argv)
        ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "Used default section name, without specific");
        my_free(optstr);
 
-       /*
-        * This check is expected to die - It's commented so we can eventually put
-        * it in a separate file for testing the return value
-        */
-       /* optstr=list2str(np_get_defaults("section_unknown@./config-tiny.ini", "section"));
-       ok( 0, "die if section isn't found");
-       my_free(optstr); */
-
        optstr=list2str(np_get_defaults("Section Two@./config-tiny.ini", "check_disk"));
        ok( !strcmp(optstr, "--something else=blah --remove=whitespace"), "config-tiny.ini's Section Two as expected");
        my_free(optstr);
index b73e1a1f62d6f1555bf08563545fd77eaeb8139a..0b91622adfe25eea98411207e64c6596ffd5f35e 100644 (file)
@@ -143,64 +143,6 @@ main (int argc, char **argv)
        ok(array_diff(argc_test, argv_test, 7, argv_known), "twice extra opts using two sections");
        my_free(&argc_test,argv_test);
 
-       /* Next three checks are expected to die. They are commented out as they
-        * could possibly go in a sepatare test checked for return value.
-        */
-       /* argv_test=(char **)malloc(6*sizeof(char **));
-       argv_test[0] = "prog_name";
-       argv_test[1] = "arg1";
-       argv_test[2] = "--extra-opts=missing@./config-opts.ini";
-       argv_test[3] = "--arg3";
-       argv_test[4] = "val2";
-       argv_test[5] = NULL;
-       argc_test=5;
-       argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
-       argv_known[0] = "prog_name";
-       argv_known[1] = "arg1";
-       argv_known[2] = "--arg3";
-       argv_known[3] = "val2";
-       argv_known[4] = NULL;
-       argv_test=np_extra_opts(&argc_test, argv_test, "check_missing");
-       ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 1");
-       my_free(&argc_test,argv_test); */
-
-       /* argv_test=(char **)malloc(7*sizeof(char **));
-       argv_test[0] = "prog_name";
-       argv_test[1] = "arg1";
-       argv_test[2] = "--extra-opts";
-       argv_test[3] = "missing@./config-opts.ini";
-       argv_test[4] = "--arg3";
-       argv_test[5] = "val2";
-       argv_test[6] = NULL;
-       argc_test=6;
-       argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
-       argv_known[0] = "prog_name";
-       argv_known[1] = "arg1";
-       argv_known[2] = "--arg3";
-       argv_known[3] = "val2";
-       argv_known[4] = NULL;
-       argv_test=np_extra_opts(&argc_test, argv_test, "check_missing");
-       ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 2");
-       my_free(&argc_test,argv_test); */
-
-       /* argv_test=(char **)malloc(6*sizeof(char **));
-       argv_test[0] = "prog_name";
-       argv_test[1] = "arg1";
-       argv_test[2] = "--extra-opts";
-       argv_test[3] = "--arg3";
-       argv_test[4] = "val2";
-       argv_test[5] = NULL;
-       argc_test=5;
-       argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
-       argv_known[0] = "prog_name";
-       argv_known[1] = "arg1";
-       argv_known[2] = "--arg3";
-       argv_known[3] = "val2";
-       argv_known[4] = NULL;
-       argv_test=np_extra_opts(&argc_test, argv_test, "check_missing");
-       ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 3");
-       my_free(&argc_test,argv_test); */
-
        return exit_status();
 }