summaryrefslogtreecommitdiff
path: root/src/testsuite.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-22 17:49:36 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-22 17:49:36 +0000
commit30c8606724660f911bb16e90f216cf7b72090b2e (patch)
tree7b685ad38b912796ef2088d36f229920a218b333 /src/testsuite.cpp
parent00ab32bc1abdf20b12af0e8f8c3e4dcc3154f8e7 (diff)
Add even more edge case matching tests (they all pass yay)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10220 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/testsuite.cpp')
-rw-r--r--src/testsuite.cpp57
1 files changed, 36 insertions, 21 deletions
diff --git a/src/testsuite.cpp b/src/testsuite.cpp
index 5d957e984..1c831ba50 100644
--- a/src/testsuite.cpp
+++ b/src/testsuite.cpp
@@ -111,35 +111,50 @@ bool TestSuite::DoWildTests()
cout << "\n\nWildcard and CIDR tests\n\n";
bool passed = false;
- WCTEST("foobar", "*");
- WCTEST("foobar", "foo*");
- WCTEST("foobar", "*bar");
- WCTEST("foobar", "foo??r");
- WCTEST("foobar.test", "fo?bar.*t");
- WCTEST("foobar", "foobar");
- WCTEST("foobar", "foo***bar");
-
- WCTESTNOT("foobar", "bazqux");
- WCTESTNOT("foobar", "*qux");
- WCTESTNOT("foobar", "foo*x");
- WCTESTNOT("foobar", "baz*");
- WCTESTNOT("foobar", "foo???r");
- WCTESTNOT("foobar", "");
- WCTESTNOT("", "foobar");
- WCTESTNOT("OperServ", "O");
- WCTESTNOT("O", "OperServ");
- WCTESTNOT("foobar.tst", "fo?bar.*g");
+ WCTEST("foobar", "*");
+ WCTEST("foobar", "foo*");
+ WCTEST("foobar", "*bar");
+ WCTEST("foobar", "foo??r");
+ WCTEST("foobar.test", "fo?bar.*t");
+ WCTEST("foobar.test", "fo?bar.t*t");
+ WCTEST("foobar.tttt", "fo?bar.**t");
+ WCTEST("foobar", "foobar");
+ WCTEST("foobar", "foo***bar");
+ WCTEST("foobar", "*foo***bar");
+ WCTEST("foobar", "**foo***bar");
+ WCTEST("foobar", "**foobar*");
+ WCTEST("foobar", "**foobar**");
+ WCTEST("foobar", "**foobar");
+ WCTEST("foobar", "**f?*?ar");
+ WCTEST("foobar", "**f?*b?r");
+ WCTEST("foofar", "**f?*f*r");
+ WCTEST("foofar", "**f?*f*?");
+ WCTEST("r", "*");
+ WCTEST("", "");
+
+ WCTESTNOT("foobar", "bazqux");
+ WCTESTNOT("foobar", "*qux");
+ WCTESTNOT("foobar", "foo*x");
+ WCTESTNOT("foobar", "baz*");
+ WCTESTNOT("foobar", "foo???r");
+ WCTESTNOT("foobar", "foobars");
+ WCTESTNOT("foobar", "**foobar**h");
+ WCTESTNOT("foobar", "**foobar**h*");
+ WCTESTNOT("foobar", "**f??*bar?");
+ WCTESTNOT("foobar", "");
+ WCTESTNOT("", "foobar");
+ WCTESTNOT("OperServ", "O");
+ WCTESTNOT("O", "OperServ");
+ WCTESTNOT("foobar.tst", "fo?bar.*g");
+ WCTESTNOT("foobar.test", "fo?bar.*tt");
CIDRTEST("brain@1.2.3.4", "*@1.2.0.0/16");
CIDRTEST("brain@1.2.3.4", "*@1.2.3.0/24");
-
CIDRTEST("192.168.3.97", "192.168.3.0/24");
CIDRTESTNOT("brain@1.2.3.4", "x*@1.2.0.0/16");
CIDRTESTNOT("brain@1.2.3.4", "*@1.3.4.0/24");
-
CIDRTESTNOT("1.2.3.4", "1.2.4.0/24");
-
CIDRTESTNOT("brain@1.2.3.4", "*@/24");
CIDRTESTNOT("brain@1.2.3.4", "@1.2.3.4/9");
CIDRTESTNOT("brain@1.2.3.4", "@");