summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/tests/test_tcp.c20
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 @@
25int 25int
26main (int argc, char **argv) 26main (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