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 | |
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
-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) | |||
64 | ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "Used default section name, without specific"); | 64 | ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "Used default section name, without specific"); |
65 | my_free(optstr); | 65 | my_free(optstr); |
66 | 66 | ||
67 | /* | ||
68 | * This check is expected to die - It's commented so we can eventually put | ||
69 | * it in a separate file for testing the return value | ||
70 | */ | ||
71 | /* optstr=list2str(np_get_defaults("section_unknown@./config-tiny.ini", "section")); | ||
72 | ok( 0, "die if section isn't found"); | ||
73 | my_free(optstr); */ | ||
74 | |||
75 | optstr=list2str(np_get_defaults("Section Two@./config-tiny.ini", "check_disk")); | 67 | optstr=list2str(np_get_defaults("Section Two@./config-tiny.ini", "check_disk")); |
76 | ok( !strcmp(optstr, "--something else=blah --remove=whitespace"), "config-tiny.ini's Section Two as expected"); | 68 | ok( !strcmp(optstr, "--something else=blah --remove=whitespace"), "config-tiny.ini's Section Two as expected"); |
77 | my_free(optstr); | 69 | 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) | |||
143 | ok(array_diff(argc_test, argv_test, 7, argv_known), "twice extra opts using two sections"); | 143 | ok(array_diff(argc_test, argv_test, 7, argv_known), "twice extra opts using two sections"); |
144 | my_free(&argc_test,argv_test); | 144 | my_free(&argc_test,argv_test); |
145 | 145 | ||
146 | /* Next three checks are expected to die. They are commented out as they | ||
147 | * could possibly go in a sepatare test checked for return value. | ||
148 | */ | ||
149 | /* argv_test=(char **)malloc(6*sizeof(char **)); | ||
150 | argv_test[0] = "prog_name"; | ||
151 | argv_test[1] = "arg1"; | ||
152 | argv_test[2] = "--extra-opts=missing@./config-opts.ini"; | ||
153 | argv_test[3] = "--arg3"; | ||
154 | argv_test[4] = "val2"; | ||
155 | argv_test[5] = NULL; | ||
156 | argc_test=5; | ||
157 | argv_known=(char **)realloc(argv_known, 5*sizeof(char **)); | ||
158 | argv_known[0] = "prog_name"; | ||
159 | argv_known[1] = "arg1"; | ||
160 | argv_known[2] = "--arg3"; | ||
161 | argv_known[3] = "val2"; | ||
162 | argv_known[4] = NULL; | ||
163 | argv_test=np_extra_opts(&argc_test, argv_test, "check_missing"); | ||
164 | ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 1"); | ||
165 | my_free(&argc_test,argv_test); */ | ||
166 | |||
167 | /* argv_test=(char **)malloc(7*sizeof(char **)); | ||
168 | argv_test[0] = "prog_name"; | ||
169 | argv_test[1] = "arg1"; | ||
170 | argv_test[2] = "--extra-opts"; | ||
171 | argv_test[3] = "missing@./config-opts.ini"; | ||
172 | argv_test[4] = "--arg3"; | ||
173 | argv_test[5] = "val2"; | ||
174 | argv_test[6] = NULL; | ||
175 | argc_test=6; | ||
176 | argv_known=(char **)realloc(argv_known, 5*sizeof(char **)); | ||
177 | argv_known[0] = "prog_name"; | ||
178 | argv_known[1] = "arg1"; | ||
179 | argv_known[2] = "--arg3"; | ||
180 | argv_known[3] = "val2"; | ||
181 | argv_known[4] = NULL; | ||
182 | argv_test=np_extra_opts(&argc_test, argv_test, "check_missing"); | ||
183 | ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 2"); | ||
184 | my_free(&argc_test,argv_test); */ | ||
185 | |||
186 | /* argv_test=(char **)malloc(6*sizeof(char **)); | ||
187 | argv_test[0] = "prog_name"; | ||
188 | argv_test[1] = "arg1"; | ||
189 | argv_test[2] = "--extra-opts"; | ||
190 | argv_test[3] = "--arg3"; | ||
191 | argv_test[4] = "val2"; | ||
192 | argv_test[5] = NULL; | ||
193 | argc_test=5; | ||
194 | argv_known=(char **)realloc(argv_known, 5*sizeof(char **)); | ||
195 | argv_known[0] = "prog_name"; | ||
196 | argv_known[1] = "arg1"; | ||
197 | argv_known[2] = "--arg3"; | ||
198 | argv_known[3] = "val2"; | ||
199 | argv_known[4] = NULL; | ||
200 | argv_test=np_extra_opts(&argc_test, argv_test, "check_missing"); | ||
201 | ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 3"); | ||
202 | my_free(&argc_test,argv_test); */ | ||
203 | |||
204 | return exit_status(); | 146 | return exit_status(); |
205 | } | 147 | } |
206 | 148 | ||