From a223678dcaf513983df3b7b26ae6256fd6e729fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 9 Nov 2013 00:35:51 +0100 Subject: [PATCH] Add test case for multiple different links in one line. --- .../java/net/pterodactylus/sone/text/SoneTextParserTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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)) + )); + } + } -- 2.7.4