Add test case for multiple different links in one line.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Nov 2013 23:35:51 +0000 (00:35 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:56 +0000 (22:25 +0100)
src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java

index b67fea8..e25420d 100644 (file)
@@ -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))
+               ));
+       }
+
 }