summaryrefslogtreecommitdiff
path: root/test/RequestTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
commit4db349c1f32b4a313d12d114137432441633d00a (patch)
tree417451971e264834312cfd8339c79930d680a5d1 /test/RequestTest.cc
parent338e8aca09331d3e7fa4e1e8e1f9d10260986772 (diff)
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
Diffstat (limited to 'test/RequestTest.cc')
-rw-r--r--test/RequestTest.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/RequestTest.cc b/test/RequestTest.cc
index ceda474f..ccbfd521 100644
--- a/test/RequestTest.cc
+++ b/test/RequestTest.cc
@@ -289,11 +289,11 @@ void RequestTest::testSetUrl17()
CPPUNIT_ASSERT_EQUAL(std::string("file%20with%20space;param%25"), req.getFile());
CPPUNIT_ASSERT_EQUAL(std::string("?a=/?"), req.getQuery());
CPPUNIT_ASSERT_EQUAL(std::string("http://host:80/file%3Cwith%252%20%20space"
- "/file%20with%20space;param%25?a=/?"),
- req.getCurrentUrl());
+ "/file%20with%20space;param%25?a=/?"),
+ req.getCurrentUrl());
CPPUNIT_ASSERT_EQUAL(std::string("http://host:80/file<with%2 %20space"
- "/file with space;param%?a=/?"),
- req.getUrl());
+ "/file with space;param%?a=/?"),
+ req.getUrl());
}
void RequestTest::testSetUrl18() {
@@ -334,11 +334,11 @@ void RequestTest::testRedirectUrl() {
CPPUNIT_ASSERT(req.supportsPersistentConnection());
// url must be the same
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.com:8080/aria2/"
- "index.html"),
- req.getUrl());
+ "index.html"),
+ req.getUrl());
// currentUrl must be updated
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.co.jp/"),
- req.getCurrentUrl());
+ req.getCurrentUrl());
// previousUrl must be "" when redirection
CPPUNIT_ASSERT_EQUAL(std::string(""), req.getPreviousUrl());
CPPUNIT_ASSERT_EQUAL(std::string("http"), req.getProtocol());
@@ -353,14 +353,14 @@ void RequestTest::testRedirectUrl() {
// Give abosulute path
CPPUNIT_ASSERT(req.redirectUrl("/abspath/to/file"));
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.co.jp/abspath/to/file"),
- req.getCurrentUrl());
+ req.getCurrentUrl());
CPPUNIT_ASSERT_EQUAL((unsigned int)2, req.getRedirectCount());
// Give relative path
CPPUNIT_ASSERT(req.redirectUrl("relativepath/to/file"));
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.co.jp/abspath/to/"
- "relativepath/to/file"),
- req.getCurrentUrl());
+ "relativepath/to/file"),
+ req.getCurrentUrl());
CPPUNIT_ASSERT_EQUAL((unsigned int)3, req.getRedirectCount());
}
@@ -412,10 +412,10 @@ void RequestTest::testInnerLink() {
bool v = req.setUrl("http://aria.rednoah.com/index.html#download");
CPPUNIT_ASSERT(v);
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.com/index.html"
- "#download"),
- req.getUrl());
+ "#download"),
+ req.getUrl());
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.com/index.html"),
- req.getCurrentUrl());
+ req.getCurrentUrl());
CPPUNIT_ASSERT_EQUAL(std::string("index.html"), req.getFile());
CPPUNIT_ASSERT_EQUAL(std::string(""), req.getQuery());
}
@@ -424,7 +424,7 @@ void RequestTest::testInnerLinkInReferer() {
Request req;
req.setReferer("http://aria.rednoah.com/home.html#top");
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.com/home.html"),
- req.getReferer());
+ req.getReferer());
}
void RequestTest::testSetUrl_zeroUsername()