1 | void testSubstituteURL1() {↵ | | 1 | void testSubstituteURL4() {↵
|
2 | String input = "This page http://columba.sourceforge.net is net!";↵ | | 2 | String input = "This page http://columba.sourceforge.net. is net!";↵
|
|
3 | String result = HtmlParser.substituteURL(input);↵ | | 3 | String result = HtmlParser.substituteURL(input);↵
|
4 | assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A> is net!", result);↵ | | 4 | assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A>. is net!", result);↵
|
5 | }↵ | | 5 | }↵
|
|
6 | public void testSubstituteURL3() {↵ | | 6 | public void testSubstituteURL5() {↵
|
7 | String input = "This page \t(http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239) is net!";↵ | | 7 | String input = "This page http://test.com/$255. is net!";↵
|
|
8 | String result = HtmlParser.substituteURL(input);↵ | | 8 | String result = HtmlParser.substituteURL(input);↵
|
9 | ↵ | | |
|
10 | assertEquals(↵ | | 9 | assertEquals(↵
|
11 | "This page \t(<A HREF=\"http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239\">http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239</A>) is net!",↵ | | 10 | "This page <A HREF=\"http://test.com/$255\">http://test.com/$255</A>. is net!",↵
|
12 | result);↵ | | 11 | result);↵
|
13 | }↵ | | 12 | }↵
|
| | | 13 | ↵
|
14 | public void testSubstituteURL4() {↵ | | 14 | public void testSubstituteURL6() {↵
|
15 | String input = "This page http://columba.sourceforge.net. is net!";↵ | | 15 | String input = "http://columbamail.org/jira/browse/CA-117<br>";↵
|
|
16 | String result = HtmlParser.substituteURL(input);↵ | | 16 | String result = HtmlParser.substituteURL(input);↵
|
| | | 17 | ↵
|
17 | assertEquals("This page ↵ | | 18 | assertEquals(↵
|
18 | <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A>. is net!",↵ | | 19 | "<A HREF=\"http://columbamail.org/jira/browse/CA-117\">http://columbamail.org/jira/browse/CA-117</A><br>",↵
|
19 | result);↵ | | 20 | result);↵
|
20 | | | 21 |
|