diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-04 21:52:45 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-04 21:52:45 (GMT) |
commit | cca36dc2457a0e3abd071c48fcbf7e87f681706c (patch) | |
tree | 5c1d263a8e9e2beb74dbe72e1867e6b0db968d70 /lib/tests/test_opts.c | |
parent | 83ec9f269438af01e9325528233256c1a5886b00 (diff) | |
download | monitoring-plugins-cca36dc2457a0e3abd071c48fcbf7e87f681706c.tar.gz |
Fixed the test (not the bug yet) and added similar one to test_ini (that one works)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2066 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/tests/test_opts.c')
-rw-r--r-- | lib/tests/test_opts.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/tests/test_opts.c b/lib/tests/test_opts.c index b2c93eb..b9696df 100644 --- a/lib/tests/test_opts.c +++ b/lib/tests/test_opts.c | |||
@@ -279,19 +279,16 @@ main (int argc, char **argv) | |||
279 | argv_test[2] = "--extra-opts=tcp_long_lines@plugins.ini"; | 279 | argv_test[2] = "--extra-opts=tcp_long_lines@plugins.ini"; |
280 | argv_test[3] = NULL; | 280 | argv_test[3] = NULL; |
281 | argc_test=3; | 281 | argc_test=3; |
282 | argv_known=(char **)realloc(argv_known, 10*sizeof(char **)); | 282 | argv_known=(char **)realloc(argv_known, 7*sizeof(char **)); |
283 | argv_known[0] = "check_tcp"; | 283 | argv_known[0] = "check_tcp"; |
284 | argv_known[1] = "--timeout"; | 284 | argv_known[1] = "--timeout=10"; |
285 | argv_known[2] = "10"; | 285 | argv_known[2] = "--escape"; |
286 | argv_known[3] = "--escape"; | 286 | argv_known[3] = "--send=Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda"; |
287 | argv_known[4] = "--send"; | 287 | argv_known[4] = "--expect=Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda"; |
288 | argv_known[5] = "Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda"; | 288 | argv_known[5] = "--jail"; |
289 | argv_known[6] = "--expect"; | 289 | argv_known[6] = NULL; |
290 | argv_known[7] = "Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda"; | ||
291 | argv_known[8] = "--jail"; | ||
292 | argv_known[9] = NULL; | ||
293 | argv_test=np_extra_opts(&argc_test, argv_test, "check_tcp"); | 290 | argv_test=np_extra_opts(&argc_test, argv_test, "check_tcp"); |
294 | ok(array_diff(argc_test, argv_test, 9, argv_known), "Long lines test"); | 291 | ok(array_diff(argc_test, argv_test, 6, argv_known), "Long lines test"); |
295 | my_free(&argc_test,argv_test); | 292 | my_free(&argc_test,argv_test); |
296 | 293 | ||
297 | return exit_status(); | 294 | return exit_status(); |