|
@@ -30,7 +30,7 @@ class UtilTest:public CppUnit::TestFixture {
|
|
|
CPPUNIT_TEST(testRandomAlpha);
|
|
|
CPPUNIT_TEST(testToUpper);
|
|
|
CPPUNIT_TEST(testToLower);
|
|
|
- CPPUNIT_TEST(testUrldecode);
|
|
|
+ CPPUNIT_TEST(testPercentDecode);
|
|
|
CPPUNIT_TEST(testGetRealSize);
|
|
|
CPPUNIT_TEST(testAbbrevSize);
|
|
|
CPPUNIT_TEST(testToStream);
|
|
@@ -81,7 +81,7 @@ public:
|
|
|
void testRandomAlpha();
|
|
|
void testToUpper();
|
|
|
void testToLower();
|
|
|
- void testUrldecode();
|
|
|
+ void testPercentDecode();
|
|
|
void testGetRealSize();
|
|
|
void testAbbrevSize();
|
|
|
void testToStream();
|
|
@@ -416,25 +416,25 @@ void UtilTest::testToLower() {
|
|
|
CPPUNIT_ASSERT_EQUAL(upp, util::toLower(src));
|
|
|
}
|
|
|
|
|
|
-void UtilTest::testUrldecode() {
|
|
|
+void UtilTest::testPercentDecode() {
|
|
|
std::string src = "http://aria2.sourceforge.net/aria2%200.7.0%20docs.html";
|
|
|
CPPUNIT_ASSERT_EQUAL(std::string("http://aria2.sourceforge.net/aria2 0.7.0 docs.html"),
|
|
|
- util::urldecode(src));
|
|
|
+ util::percentDecode(src));
|
|
|
|
|
|
std::string src2 = "aria2+aria2";
|
|
|
- CPPUNIT_ASSERT_EQUAL(std::string("aria2+aria2"), util::urldecode(src2));
|
|
|
+ CPPUNIT_ASSERT_EQUAL(std::string("aria2+aria2"), util::percentDecode(src2));
|
|
|
|
|
|
std::string src3 = "%5t%20";
|
|
|
- CPPUNIT_ASSERT_EQUAL(std::string("%5t "), util::urldecode(src3));
|
|
|
+ CPPUNIT_ASSERT_EQUAL(std::string("%5t "), util::percentDecode(src3));
|
|
|
|
|
|
std::string src4 = "%";
|
|
|
- CPPUNIT_ASSERT_EQUAL(std::string("%"), util::urldecode(src4));
|
|
|
+ CPPUNIT_ASSERT_EQUAL(std::string("%"), util::percentDecode(src4));
|
|
|
|
|
|
std::string src5 = "%3";
|
|
|
- CPPUNIT_ASSERT_EQUAL(std::string("%3"), util::urldecode(src5));
|
|
|
+ CPPUNIT_ASSERT_EQUAL(std::string("%3"), util::percentDecode(src5));
|
|
|
|
|
|
std::string src6 = "%2f";
|
|
|
- CPPUNIT_ASSERT_EQUAL(std::string("/"), util::urldecode(src6));
|
|
|
+ CPPUNIT_ASSERT_EQUAL(std::string("/"), util::percentDecode(src6));
|
|
|
}
|
|
|
|
|
|
void UtilTest::testGetRealSize()
|