diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-12-26 19:13:42 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-12-26 19:14:05 (GMT) |
commit | 7f1b958ef2f9d1b892c51d5f7de3a6ab5669a804 (patch) | |
tree | a95caf7209de3f9de2fda26e1efb3246910c797a /SwifTools/UnitTest | |
parent | 49d621c38effcdcc9aaafd3ee14082a2ae8278c4 (diff) | |
download | swift-contrib-7f1b958ef2f9d1b892c51d5f7de3a6ab5669a804.zip swift-contrib-7f1b958ef2f9d1b892c51d5f7de3a6ab5669a804.tar.bz2 |
Fixed linkifying of unicode URLs.
Diffstat (limited to 'SwifTools/UnitTest')
-rw-r--r-- | SwifTools/UnitTest/LinkifyTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/SwifTools/UnitTest/LinkifyTest.cpp b/SwifTools/UnitTest/LinkifyTest.cpp index 9655b87..60edc9b 100644 --- a/SwifTools/UnitTest/LinkifyTest.cpp +++ b/SwifTools/UnitTest/LinkifyTest.cpp @@ -28,6 +28,7 @@ class LinkifyTest : public CppUnit::TestFixture { CPPUNIT_TEST(testLinkify_Authentication); CPPUNIT_TEST(testLinkify_At); CPPUNIT_TEST(testLinkify_Amps); + CPPUNIT_TEST(testLinkify_UnicodeCharacter); CPPUNIT_TEST_SUITE_END(); public: @@ -151,6 +152,14 @@ class LinkifyTest : public CppUnit::TestFixture { String("<a href=\"http://swift.im/foo&bar&baz\">http://swift.im/foo&bar&baz</a>"), result); } + + void testLinkify_UnicodeCharacter() { + String result = Linkify::linkify("http://\xe2\x98\x83.net"); + + CPPUNIT_ASSERT_EQUAL( + String("<a href=\"http://\xe2\x98\x83.net\">http://\xe2\x98\x83.net</a>"), + result); + } }; CPPUNIT_TEST_SUITE_REGISTRATION(LinkifyTest); |