From f9f84b3d960bfe92103235edef607d8db8d0b6b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Mon, 16 Nov 2009 21:59:49 +0100 Subject: Add another linkifier test. diff --git a/SwifTools/UnitTest/LinkifyTest.cpp b/SwifTools/UnitTest/LinkifyTest.cpp index a249d48..b55067c 100644 --- a/SwifTools/UnitTest/LinkifyTest.cpp +++ b/SwifTools/UnitTest/LinkifyTest.cpp @@ -13,6 +13,7 @@ class LinkifyTest : public CppUnit::TestFixture { CPPUNIT_TEST(testLinkify_URLSurroundedByWhitespace); CPPUNIT_TEST(testLinkify_MultipleURLs); CPPUNIT_TEST(testLinkify_CamelCase); + CPPUNIT_TEST(testLinkify_HierarchicalResource); CPPUNIT_TEST_SUITE_END(); public: @@ -64,6 +65,14 @@ class LinkifyTest : public CppUnit::TestFixture { String("<a href=\"http://fOo.cOm/bAz\">http://fOo.cOm/bAz</a>"), result); } + + void testLinkify_HierarchicalResource() { + 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); -- cgit v0.10.2-6-g49f6