summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-16 18:20:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-16 18:20:52 (GMT)
commitb793111e4e4bbbe6738e4d0838e9a99b3580549d (patch)
tree7ad1e14e80d71229204fa3234294187353e1e28c /SwifTools/UnitTest/LinkifyTest.cpp
parent05111e25fd10aa140cd823d37ca884b73dad2725 (diff)
downloadswift-contrib-b793111e4e4bbbe6738e4d0838e9a99b3580549d.zip
swift-contrib-b793111e4e4bbbe6738e4d0838e9a99b3580549d.tar.bz2
Fixed Linkify on camel case URLs.
Diffstat (limited to 'SwifTools/UnitTest/LinkifyTest.cpp')
-rw-r--r--SwifTools/UnitTest/LinkifyTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/SwifTools/UnitTest/LinkifyTest.cpp b/SwifTools/UnitTest/LinkifyTest.cpp
index 9b66614..a249d48 100644
--- a/SwifTools/UnitTest/LinkifyTest.cpp
+++ b/SwifTools/UnitTest/LinkifyTest.cpp
@@ -12,6 +12,7 @@ class LinkifyTest : public CppUnit::TestFixture {
CPPUNIT_TEST(testLinkify_BareURL);
CPPUNIT_TEST(testLinkify_URLSurroundedByWhitespace);
CPPUNIT_TEST(testLinkify_MultipleURLs);
+ CPPUNIT_TEST(testLinkify_CamelCase);
CPPUNIT_TEST_SUITE_END();
public:
@@ -55,6 +56,14 @@ class LinkifyTest : public CppUnit::TestFixture {
String("Foo <a href=\"http://swift.im/blog\">http://swift.im/blog</a> Bar <a href=\"http://el-tramo.be/about\">http://el-tramo.be/about</a> Baz"),
result);
}
+
+ void testLinkify_CamelCase() {
+ String result = Linkify::linkify("http://fOo.cOm/bAz");
+
+ CPPUNIT_ASSERT_EQUAL(
+ String("<a href=\"http://fOo.cOm/bAz\">http://fOo.cOm/bAz</a>"),
+ result);
+ }
};
CPPUNIT_TEST_SUITE_REGISTRATION(LinkifyTest);