mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 05:57:36 +03:00
2009-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten Request::parseUrl() * src/Request.cc * test/RequestTest.cc
This commit is contained in:
parent
37a50cf468
commit
7a94ae6af2
3 changed files with 151 additions and 75 deletions
|
@ -28,6 +28,8 @@ class RequestTest:public CppUnit::TestFixture {
|
|||
CPPUNIT_TEST(testSetUrl15);
|
||||
CPPUNIT_TEST(testSetUrl16);
|
||||
CPPUNIT_TEST(testSetUrl17);
|
||||
CPPUNIT_TEST(testSetUrl18);
|
||||
CPPUNIT_TEST(testSetUrl19);
|
||||
CPPUNIT_TEST(testSetUrl_username);
|
||||
CPPUNIT_TEST(testSetUrl_usernamePassword);
|
||||
CPPUNIT_TEST(testSetUrl_zeroUsername);
|
||||
|
@ -61,6 +63,8 @@ public:
|
|||
void testSetUrl15();
|
||||
void testSetUrl16();
|
||||
void testSetUrl17();
|
||||
void testSetUrl18();
|
||||
void testSetUrl19();
|
||||
void testSetUrl_username();
|
||||
void testSetUrl_usernamePassword();
|
||||
void testSetUrl_zeroUsername();
|
||||
|
@ -290,6 +294,21 @@ void RequestTest::testSetUrl17()
|
|||
req.getUrl());
|
||||
}
|
||||
|
||||
void RequestTest::testSetUrl18() {
|
||||
Request req;
|
||||
bool v = req.setUrl("http://1/");
|
||||
|
||||
CPPUNIT_ASSERT(v);
|
||||
}
|
||||
|
||||
void RequestTest::testSetUrl19() {
|
||||
Request req;
|
||||
// No host
|
||||
bool v = req.setUrl("http://user@");
|
||||
|
||||
CPPUNIT_ASSERT(!v);
|
||||
}
|
||||
|
||||
void RequestTest::testRedirectUrl() {
|
||||
Request req;
|
||||
req.supportsPersistentConnection(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue