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 | |
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
-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 @@ | |||
25 | int | 25 | int |
26 | main (int argc, char **argv) | 26 | main (int argc, char **argv) |
27 | { | 27 | { |
28 | int i; | ||
29 | char** server_expect; | 28 | char** server_expect; |
30 | char* status; | ||
31 | bool verbose; | ||
32 | bool exact_match; | ||
33 | int server_expect_count = 3; | 29 | int server_expect_count = 3; |
34 | plan_tests(8); | 30 | plan_tests(8); |
35 | 31 | ||
@@ -39,21 +35,21 @@ main (int argc, char **argv) | |||
39 | server_expect[1] = strdup("bb"); | 35 | server_expect[1] = strdup("bb"); |
40 | server_expect[2] = strdup("CC"); | 36 | server_expect[2] = strdup("CC"); |
41 | 37 | ||
42 | ok(np_expect_match("AA bb CC XX", server_expect, server_expect_count, false, true, false) == true, | 38 | ok(np_expect_match("AA bb CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == TRUE, |
43 | "Test matching any string at the beginning (first expect string)"); | 39 | "Test matching any string at the beginning (first expect string)"); |
44 | ok(np_expect_match("bb AA CC XX", server_expect, server_expect_count, false, true, false) == true, | 40 | ok(np_expect_match("bb AA CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == TRUE, |
45 | "Test matching any string at the beginning (second expect string)"); | 41 | "Test matching any string at the beginning (second expect string)"); |
46 | ok(np_expect_match("XX bb AA CC XX", server_expect, server_expect_count, false, true, false) == false, | 42 | ok(np_expect_match("XX bb AA CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == FALSE, |
47 | "Test with strings not matching at the beginning"); | 43 | "Test with strings not matching at the beginning"); |
48 | ok(np_expect_match("XX CC XX", server_expect, server_expect_count, false, true, false) == false, | 44 | ok(np_expect_match("XX CC XX", server_expect, server_expect_count, FALSE, TRUE, FALSE) == FALSE, |
49 | "Test matching any string"); | 45 | "Test matching any string"); |
50 | ok(np_expect_match("XX", server_expect, server_expect_count, false, false, false) == false, | 46 | ok(np_expect_match("XX", server_expect, server_expect_count, FALSE, FALSE, FALSE) == FALSE, |
51 | "Test not matching any string"); | 47 | "Test not matching any string"); |
52 | ok(np_expect_match("XX AA bb CC XX", server_expect, server_expect_count, true, false, false) == true, | 48 | ok(np_expect_match("XX AA bb CC XX", server_expect, server_expect_count, TRUE, FALSE, FALSE) == TRUE, |
53 | "Test matching all strings"); | 49 | "Test matching all strings"); |
54 | ok(np_expect_match("XX bb CC XX", server_expect, server_expect_count, true, false, false) == false, | 50 | ok(np_expect_match("XX bb CC XX", server_expect, server_expect_count, TRUE, FALSE, FALSE) == FALSE, |
55 | "Test not matching all strings"); | 51 | "Test not matching all strings"); |
56 | ok(np_expect_match("XX XX", server_expect, server_expect_count, true, false, false) == false, | 52 | ok(np_expect_match("XX XX", server_expect, server_expect_count, TRUE, FALSE, FALSE) == FALSE, |
57 | "Test not matching any string (testing all)"); | 53 | "Test not matching any string (testing all)"); |
58 | 54 | ||
59 | 55 | ||