summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-04-25 18:40:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-04-25 18:40:18 (GMT)
commit508a5e258d5de152b5b58ceca67a0135383f4fe0 (patch)
treef0a8ea959823a2cd7979597beaa84032e4197a9e /SwifTools/UnitTest/LinkifyTest.cpp
parent863b3d6c73f42e316dd8416cad36b9dc3a30656b (diff)
downloadswift-contrib-508a5e258d5de152b5b58ceca67a0135383f4fe0.zip
swift-contrib-508a5e258d5de152b5b58ceca67a0135383f4fe0.tar.bz2
Don't linkify /me actions.
Resolves: #959
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 3d0ce00..5df1a96 100644
--- a/SwifTools/UnitTest/LinkifyTest.cpp
+++ b/SwifTools/UnitTest/LinkifyTest.cpp
@@ -31,6 +31,7 @@ class LinkifyTest : public CppUnit::TestFixture {
CPPUNIT_TEST(testLinkify_UnicodeCharacter);
CPPUNIT_TEST(testLinkify_NewLine);
CPPUNIT_TEST(testLinkify_Tab);
+ CPPUNIT_TEST(testLinkify_Action);
CPPUNIT_TEST_SUITE_END();
public:
@@ -178,6 +179,14 @@ class LinkifyTest : public CppUnit::TestFixture {
std::string("<a href=\"http://swift.im\">http://swift.im</a>\tfoo"),
result);
}
+
+ void testLinkify_Action() {
+ std::string result = Linkify::linkify("*http://swift.im*");
+
+ CPPUNIT_ASSERT_EQUAL(
+ std::string("*<a href=\"http://swift.im\">http://swift.im</a>*"),
+ result);
+ }
};
CPPUNIT_TEST_SUITE_REGISTRATION(LinkifyTest);