summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-24 17:44:56 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-24 17:44:56 (GMT)
commit2d3c5ce054a27548e72638c02c9bf3c8cec2faba (patch)
treead111e1b844f28ea176c58861defed3f043be7cc /SwifTools/UnitTest
parent3dadad3249bee2c41b610c7148ddc41ea6b351ca (diff)
downloadswift-2d3c5ce054a27548e72638c02c9bf3c8cec2faba.zip
swift-2d3c5ce054a27548e72638c02c9bf3c8cec2faba.tar.bz2
Linkify links with @ in them properly.
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 afaac60..1418957 100644
--- a/SwifTools/UnitTest/LinkifyTest.cpp
+++ b/SwifTools/UnitTest/LinkifyTest.cpp
@@ -25,6 +25,7 @@ class LinkifyTest : public CppUnit::TestFixture {
CPPUNIT_TEST(testLinkify_Tilde);
CPPUNIT_TEST(testLinkify_Equal);
CPPUNIT_TEST(testLinkify_Authentication);
+ CPPUNIT_TEST(testLinkify_At);
CPPUNIT_TEST_SUITE_END();
public:
@@ -124,6 +125,14 @@ class LinkifyTest : public CppUnit::TestFixture {
String("<a href=\"http://bob:bla@swift.im/foo/bar\">http://bob:bla@swift.im/foo/bar</a>"),
result);
}
+
+ void testLinkify_At() {
+ String result = Linkify::linkify("http://swift.im/foo@bar");
+
+ CPPUNIT_ASSERT_EQUAL(
+ String("<a href=\"http://swift.im/foo@bar\">http://swift.im/foo@bar</a>"),
+ result);
+ }
};
CPPUNIT_TEST_SUITE_REGISTRATION(LinkifyTest);