From: David ‘Bombe’ Roden Date: Fri, 8 Nov 2013 23:35:51 +0000 (+0100) Subject: Add test case for multiple different links in one line. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a223678dcaf513983df3b7b26ae6256fd6e729fb;p=Sone.git Add test case for multiple different links in one line. --- diff --git a/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java b/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java index b67fea8..e25420d 100644 --- a/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java +++ b/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java @@ -300,4 +300,13 @@ public class SoneTextParserTest { )); } + @Test + public void multipleLinksInOneLine() throws IOException { + assertThat(parse("KSK@gpl.txt and http://server.com/"), matches( + is(new FreenetLinkPart("KSK@gpl.txt", "gpl.txt", false)), + is(new PlainTextPart(" and ")), + is(new FreenetLinkPart("http://server.com/", "server.com", false)) + )); + } + }