diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-24 07:41:45 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-24 07:41:45 -0500 |
commit | 0a74b6fda08c484cba7216596d2ffa3931b900e5 (patch) | |
tree | 766234822874597f1d39416a231f196f15a160bf /lib/tests | |
parent | 1b1dc7a48b7072aa9ba3a6c93e76d07f7c12d31f (diff) | |
download | monitoring-plugins-0a74b6fda08c484cba7216596d2ffa3931b900e5.tar.gz |
Remove the commented out blocks
The die tests are implemented in the test_*3.t files
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/test_ini1.c | 8 | ||||
-rw-r--r-- | lib/tests/test_opts1.c | 58 |
2 files changed, 0 insertions, 66 deletions
diff --git a/lib/tests/test_ini1.c b/lib/tests/test_ini1.c index c0853d7c..77f88549 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 b73e1a1f..0b91622a 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(); } |