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