diff options
Diffstat (limited to 'lib/tests/test_opts1.c')
-rw-r--r-- | lib/tests/test_opts1.c | 58 |
1 files changed, 0 insertions, 58 deletions
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 | ||