summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-23 17:41:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-23 17:41:17 (GMT)
commitb8aa124f6baa0c0a32ccfd7479fa1e6f0dff3487 (patch)
tree3472d3424d9ab67bdc51eeb35b92c9bd86619306 /SwifTools/UnitTest
parent1e0c7d5c9d53ee6678a5f27d554710e6ae56d2da (diff)
downloadswift-contrib-b8aa124f6baa0c0a32ccfd7479fa1e6f0dff3487.zip
swift-contrib-b8aa124f6baa0c0a32ccfd7479fa1e6f0dff3487.tar.bz2
Fix linkifying links with '+'.
Diffstat (limited to 'SwifTools/UnitTest')
-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 b31bbfe..6c5fb15 100644
--- a/SwifTools/UnitTest/LinkifyTest.cpp
+++ b/SwifTools/UnitTest/LinkifyTest.cpp
@@ -15,6 +15,7 @@ class LinkifyTest : public CppUnit::TestFixture {
CPPUNIT_TEST(testLinkify_CamelCase);
CPPUNIT_TEST(testLinkify_HierarchicalResource);
CPPUNIT_TEST(testLinkify_Anchor);
+ CPPUNIT_TEST(testLinkify_Plus);
CPPUNIT_TEST_SUITE_END();
public:
@@ -82,6 +83,14 @@ class LinkifyTest : public CppUnit::TestFixture {
String("<a href=\"http://foo.com/bar#baz\">http://foo.com/bar#baz</a>"),
result);
}
+
+ void testLinkify_Plus() {
+ String result = Linkify::linkify("http://foo.com/bar+baz");
+
+ CPPUNIT_ASSERT_EQUAL(
+ String("<a href=\"http://foo.com/bar+baz\">http://foo.com/bar+baz</a>"),
+ result);
+ }
};
CPPUNIT_TEST_SUITE_REGISTRATION(LinkifyTest);