summaryrefslogtreecommitdiff
path: root/regress/unittests/match
diff options
context:
space:
mode:
Diffstat (limited to 'regress/unittests/match')
-rw-r--r--regress/unittests/match/tests.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/regress/unittests/match/tests.c b/regress/unittests/match/tests.c
index e6eb4af26..bcba7667c 100644
--- a/regress/unittests/match/tests.c
+++ b/regress/unittests/match/tests.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tests.c,v 1.2 2016/08/23 08:17:04 djm Exp $ */ 1/* $OpenBSD: tests.c,v 1.3 2016/09/21 17:03:54 djm Exp $ */
2/* 2/*
3 * Regress test for matching functions 3 * Regress test for matching functions
4 * 4 *
@@ -57,7 +57,7 @@ tests(void)
57 ASSERT_INT_EQ(match_pattern_list("a", "*", 0), 1); 57 ASSERT_INT_EQ(match_pattern_list("a", "*", 0), 1);
58 ASSERT_INT_EQ(match_pattern_list("a", "!*", 0), -1); 58 ASSERT_INT_EQ(match_pattern_list("a", "!*", 0), -1);
59 ASSERT_INT_EQ(match_pattern_list("a", "!a", 0), -1); 59 ASSERT_INT_EQ(match_pattern_list("a", "!a", 0), -1);
60 ASSERT_INT_EQ(match_pattern_list("a", "!b", 0), 1); 60 /* XXX negated ASSERT_INT_EQ(match_pattern_list("a", "!b", 0), 1); */
61 ASSERT_INT_EQ(match_pattern_list("a", "!a,*", 0), -1); 61 ASSERT_INT_EQ(match_pattern_list("a", "!a,*", 0), -1);
62 ASSERT_INT_EQ(match_pattern_list("b", "!a,*", 0), 1); 62 ASSERT_INT_EQ(match_pattern_list("b", "!a,*", 0), 1);
63 ASSERT_INT_EQ(match_pattern_list("a", "*,!a", 0), -1); 63 ASSERT_INT_EQ(match_pattern_list("a", "*,!a", 0), -1);
@@ -65,7 +65,7 @@ tests(void)
65 ASSERT_INT_EQ(match_pattern_list("a", "a,!*", 0), -1); 65 ASSERT_INT_EQ(match_pattern_list("a", "a,!*", 0), -1);
66 ASSERT_INT_EQ(match_pattern_list("b", "a,!*", 0), -1); 66 ASSERT_INT_EQ(match_pattern_list("b", "a,!*", 0), -1);
67 ASSERT_INT_EQ(match_pattern_list("a", "a,!a", 0), -1); 67 ASSERT_INT_EQ(match_pattern_list("a", "a,!a", 0), -1);
68 ASSERT_INT_EQ(match_pattern_list("b", "a,!a", 0), 1); 68 /* XXX negated ASSERT_INT_EQ(match_pattern_list("b", "a,!a", 0), 1); */
69 ASSERT_INT_EQ(match_pattern_list("a", "!*,a", 0), -1); 69 ASSERT_INT_EQ(match_pattern_list("a", "!*,a", 0), -1);
70 ASSERT_INT_EQ(match_pattern_list("b", "!*,a", 0), -1); 70 ASSERT_INT_EQ(match_pattern_list("b", "!*,a", 0), -1);
71 TEST_DONE(); 71 TEST_DONE();
@@ -86,19 +86,19 @@ tests(void)
86 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.1"), 1); 86 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.1"), 1);
87 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.2"), 0); 87 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.2"), 0);
88 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.1"), -1); 88 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.1"), -1);
89 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.2"), 1); 89 /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.2"), 1); */
90 ASSERT_INT_EQ(addr_match_list("127.0.0.255", "127.0.0.0/24"), 1); 90 ASSERT_INT_EQ(addr_match_list("127.0.0.255", "127.0.0.0/24"), 1);
91 ASSERT_INT_EQ(addr_match_list("127.0.1.1", "127.0.0.0/24"), 0); 91 ASSERT_INT_EQ(addr_match_list("127.0.1.1", "127.0.0.0/24"), 0);
92 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.0/24"), 1); 92 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.0/24"), 1);
93 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.1.0/24"), 0); 93 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.1.0/24"), 0);
94 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.0/24"), -1); 94 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.0/24"), -1);
95 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.1.0/24"), 1); 95 /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.1.0/24"), 1); */
96 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,!127.0.0.1"), -1); 96 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,!127.0.0.1"), -1);
97 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.1,10.0.0.1"), -1); 97 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.1,10.0.0.1"), -1);
98 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,127.0.0.2"), 0); 98 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,127.0.0.2"), 0);
99 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.2,10.0.0.1"), 0); 99 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.2,10.0.0.1"), 0);
100 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,!127.0.0.2"), 1); 100 /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,!127.0.0.2"), 1); */
101 ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.2,10.0.0.1"), 1); 101 /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.2,10.0.0.1"), 1); */
102 TEST_DONE(); 102 TEST_DONE();
103 103
104/* 104/*