diff options
author | Matthias Eble <psychotrahe@users.sourceforge.net> | 2007-06-03 15:58:22 +0000 |
---|---|---|
committer | Matthias Eble <psychotrahe@users.sourceforge.net> | 2007-06-03 15:58:22 +0000 |
commit | 9480b4ad3e33df79b11927399f4d13bbbb4816a5 (patch) | |
tree | 0236219000bfbbd7f6e5c857d95b0b561fc83785 /lib | |
parent | fdd2312171ef9ecc030abf522915f55a025f78bc (diff) | |
download | monitoring-plugins-9480b4ad3e33df79b11927399f4d13bbbb4816a5.tar.gz |
Minor corrections to test_tcp.c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1732 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tests/test_tcp.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/tests/test_tcp.c b/lib/tests/test_tcp.c index 68aa9dc5..7e87c076 100644 --- a/lib/tests/test_tcp.c +++ b/lib/tests/test_tcp.c @@ -25,11 +25,7 @@ int main (int argc, char **argv) { - int i; char** server_expect; - char* status; - bool verbose; - bool exact_match; int server_expect_count = 3; plan_tests(8); @@ -39,21 +35,21 @@ main (int argc, char **argv) server_expect[1] = strdup("bb"); server_expect[2] = strdup("CC"); - ok(np_expect_match("AA bb CC XX", server_expect, server_expect_count, false, true, false) == true, + ok(np_expect_match("AA bb CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == TRUE, "Test matching any string at the beginning (first expect string)"); - ok(np_expect_match("bb AA CC XX", server_expect, server_expect_count, false, true, false) == true, + ok(np_expect_match("bb AA CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == TRUE, "Test matching any string at the beginning (second expect string)"); - ok(np_expect_match("XX bb AA CC XX", server_expect, server_expect_count, false, true, false) == false, + ok(np_expect_match("XX bb AA CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == FALSE, "Test with strings not matching at the beginning"); - ok(np_expect_match("XX CC XX", server_expect, server_expect_count, false, true, false) == false, + ok(np_expect_match("XX CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == FALSE, "Test matching any string"); - ok(np_expect_match("XX", server_expect, server_expect_count, false, false, false) == false, + ok(np_expect_match("XX", server_expect, server_expect_count, FALSE, FALSE, FALSE) == FALSE, "Test not matching any string"); - ok(np_expect_match("XX AA bb CC XX", server_expect, server_expect_count, true, false, false) == true, + ok(np_expect_match("XX AA bb CC XX", server_expect, server_expect_count, TRUE, FALSE, FALSE) == TRUE, "Test matching all strings"); - ok(np_expect_match("XX bb CC XX", server_expect, server_expect_count, true, false, false) == false, + ok(np_expect_match("XX bb CC XX", server_expect, server_expect_count, TRUE, FALSE, FALSE) == FALSE, "Test not matching all strings"); - ok(np_expect_match("XX XX", server_expect, server_expect_count, true, false, false) == false, + ok(np_expect_match("XX XX", server_expect, server_expect_count, TRUE, FALSE, FALSE) == FALSE, "Test not matching any string (testing all)"); |