]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/testACLMaxUserIP.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / tests / testACLMaxUserIP.cc
index 24b96939603b13f98fade36c23de267dfa84f7df..128806264f0afca5213d43494e5b42ba65e23e78 100644 (file)
@@ -1,11 +1,12 @@
 #define SQUID_UNIT_TEST 1
 
-#include "squid-old.h"
+#include "squid.h"
 
 #if USE_AUTH
 
-#include "testACLMaxUserIP.h"
 #include "auth/AclMaxUserIp.h"
+#include "ConfigParser.h"
+#include "testACLMaxUserIP.h"
 
 #if HAVE_STDEXCEPT
 #include <stdexcept>
@@ -13,7 +14,6 @@
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testACLMaxUserIP );
 
-
 void
 testACLMaxUserIP::testDefaults()
 {
@@ -26,14 +26,13 @@ testACLMaxUserIP::testDefaults()
     CPPUNIT_ASSERT(!anACL.valid());
 }
 
-
 void
 testACLMaxUserIP::testParseLine()
 {
     /* a config line to pass with a lead-in token to seed the parser. */
-    char * line = xstrdup("token -s 1");
+    char * line = xstrdup("-s 1");
     /* seed the parser */
-    strtok(line, w_space);
+    ConfigParser::SetCfgLine(line);
     ACLMaxUserIP anACL("max_user_ip");
     anACL.parse();
     /* we want a maximum of one, and strict to be true */