From: Thomas Guyot-Sionnest Date: Sat, 24 Jan 2009 12:41:45 +0000 (-0500) Subject: Remove the commented out blocks X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0a74b6fda08c484cba7216596d2ffa3931b900e5;p=nagiosplug.git Remove the commented out blocks The die tests are implemented in the test_*3.t files --- diff --git a/lib/tests/test_ini1.c b/lib/tests/test_ini1.c index c0853d7..77f8854 100644 --- a/lib/tests/test_ini1.c +++ b/lib/tests/test_ini1.c @@ -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); diff --git a/lib/tests/test_opts1.c b/lib/tests/test_opts1.c index b73e1a1..0b91622 100644 --- a/lib/tests/test_opts1.c +++ b/lib/tests/test_opts1.c @@ -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(); }