* ---------------------------------------------------
*/
-/* $Core: libIRCDtestsuite */
+/* $Core */
#include "inspircd.h"
#include "testsuite.h"
cout << "(3) Unload a module\n";
cout << "(4) Threading tests\n";
cout << "(5) Wildcard and CIDR tests\n";
- cout << "(6) irc::string -> std::string dynamic cast\n";
cout << endl << "(X) Exit test suite\n";
- cout << "\nChoice: ";
+ cout << "\nChoices (Enter one or more options as a list then press enter, e.g. 15X): ";
cin >> choice;
if (!choice)
case '5':
cout << (DoWildTests() ? "\nSUCCESS!\n" : "\nFAILURE\n");
break;
- case '6':
- {
- std::string* a = new std::string("test");
- irc::string* b = (irc::string)a;
- cout << "std::string value: '" << *a << "' irc::string value: '" << *b << "'" << endl;
- delete a;
- }
- break;
case 'X':
return;
break;
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", "baz*");
WCTESTNOT("foobar", "foo???r");
WCTESTNOT("foobar", "");
+ WCTESTNOT("", "foobar");
+ WCTESTNOT("OperServ", "O");
+ WCTESTNOT("O", "OperServ");
+ WCTESTNOT("foobar.tst", "fo?bar.*g");
CIDRTEST("brain@1.2.3.4", "*@1.2.0.0/16");
CIDRTEST("brain@1.2.3.4", "*@1.2.3.0/24");