summaryrefslogtreecommitdiff
path: root/src/testsuite.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-09 18:39:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-09 18:39:37 +0000
commit8888d8ef07529fcff1913a89be7dea72d731530b (patch)
tree0d5c92fbaa9fb82b727aa3acfc329fd78d5a654c /src/testsuite.cpp
parent03ef675c0dd4742464d8ad93888e98721a044108 (diff)
Add test suites for edge cases and in the process, spot a crash in the new code and fix it (empty mask in the match() functions makes it bomb)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9682 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/testsuite.cpp')
-rw-r--r--src/testsuite.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testsuite.cpp b/src/testsuite.cpp
index a4d8c871c..cff6d9b93 100644
--- a/src/testsuite.cpp
+++ b/src/testsuite.cpp
@@ -121,6 +121,8 @@ bool TestSuite::DoWildTests()
WCTESTNOT("foobar", "*qux");
WCTESTNOT("foobar", "foo*x");
WCTESTNOT("foobar", "baz*");
+ WCTESTNOT("foobar", "foo???r");
+ WCTESTNOT("foobar", "");
CIDRTEST("brain@1.2.3.4", "*@1.2.0.0/16");
CIDRTEST("brain@1.2.3.4", "*@1.2.3.0/24");
@@ -128,6 +130,11 @@ bool TestSuite::DoWildTests()
CIDRTESTNOT("brain@1.2.3.4", "x*@1.2.0.0/16");
CIDRTESTNOT("brain@1.2.3.4", "*@1.3.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", "@");
+ CIDRTESTNOT("brain@1.2.3.4", "");
+
return passed;
}