diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java index 809318a..d923c6a 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java @@ -4,6 +4,7 @@ import cgeo.geocaching.test.mock.MockedCache; import cgeo.geocaching.utils.BaseUtils; import android.test.AndroidTestCase; +import android.text.Html; public class GCConstantsTest extends AndroidTestCase { @@ -42,4 +43,9 @@ public class GCConstantsTest extends AndroidTestCase { assertEquals("aKWZ", BaseUtils.getMatch(session, GCConstants.PATTERN_USERSESSION, "")); assertTrue(BaseUtils.getMatch(session, GCConstants.PATTERN_SESSIONTOKEN, "").startsWith("123pNK")); } + + public static void testTBWithSpecialChar() { + String page = "<meta name=\"og:site_name\" content=\"Geocaching.com\" property=\"og:site_name\" /><meta name=\"og:type\" content=\"article\" property=\"og:type\" /><meta name=\"fb:app_id\" content=\"100167303362705\" property=\"fb:app_id\" /><meta name=\"og:url\" content=\"http://coord.info/TB4VPZD\" property=\"og:url\" /><meta name=\"og:description\" property=\"og:description\" /><meta name=\"og:image\" content=\"http://www.geocaching.com/images/facebook/wpttypes/24.png\" property=\"og:image\" /><meta name=\"og:title\" content=\"Schlauchen&ravestorm\" property=\"og:title\" /></head>\n"; + assertEquals("Schlauchen&ravestorm", Html.fromHtml(BaseUtils.getMatch(page, GCConstants.PATTERN_TRACKABLE_NAME, "")).toString()); + } } |
