From 62ac999d1aec2c6c43dba6ed73d708daa3db4602 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Sat, 16 Feb 2019 20:41:13 +0100 Subject: [PATCH] Added another test for broken autolink --- .../eu/faircode/email/HtmlHelperTest.java | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/app/src/test/java/eu/faircode/email/HtmlHelperTest.java b/app/src/test/java/eu/faircode/email/HtmlHelperTest.java index f71011dc78..172fd181bd 100644 --- a/app/src/test/java/eu/faircode/email/HtmlHelperTest.java +++ b/app/src/test/java/eu/faircode/email/HtmlHelperTest.java @@ -55,6 +55,55 @@ class HtmlHelperTest { "http://example.org/ and " + "http://example.org/subdir/" ); + + testAutolink( + "http://example.org/ and http://example.org/ and http://example.org/", + + // FIXME: Even when the same URL is mentioned multiple times, + // each of the URLs must only appear a single time. + "" + + "http://example.org/" + + "\">" + + "http://example.org/" + + "" + + "\">" + + "http://example.org/" + + "\">" + + "http://example.org/" + + "" + + "" + + " and " + + "http://example.org/" + + "\">" + + "http://example.org/" + + "" + + "\">" + + "http://example.org/" + + "\">" + + "http://example.org/" + + "" + + "" + + " and " + + "http://example.org/" + + "\">" + + "http://example.org/" + + "" + + "\">" + + "http://example.org/" + + "\">" + + "http://example.org/" + + "" + + "" + ); } private void testAutolink(String input, String expectedOutput) {