diff options
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 7ca921e..332d167 100644 --- a/SwifTools/UnitTest/LinkifyTest.cpp +++ b/SwifTools/UnitTest/LinkifyTest.cpp @@ -23,6 +23,7 @@ class LinkifyTest : public CppUnit::TestFixture { CPPUNIT_TEST(testLinkify_Anchor); CPPUNIT_TEST(testLinkify_Plus); CPPUNIT_TEST(testLinkify_Tilde); + CPPUNIT_TEST(testLinkify_Authentication); CPPUNIT_TEST_SUITE_END(); public: @@ -106,6 +107,14 @@ class LinkifyTest : public CppUnit::TestFixture { String("<a href=\"http://foo.com/~kev/\">http://foo.com/~kev/</a>"), result); } + + void testLinkify_Authentication() { + String result = Linkify::linkify("http://bob:bla@swift.im/foo/bar"); + + CPPUNIT_ASSERT_EQUAL( + String("<a href=\"http://bob:bla@swift.im/foo/bar\">http://bob:bla@swift.im/foo/bar</a>"), + result); + } }; CPPUNIT_TEST_SUITE_REGISTRATION(LinkifyTest); |