Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19476/src/org/htmlparser/tests/tagTests
Modified Files:
LinkTagTest.java
Log Message:
Add test case for bug #982175 False Positives on ® entity.
Not reproducible (version 1.5).
Index: LinkTagTest.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/LinkTagTest.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** LinkTagTest.java 18 Jul 2004 21:31:21 -0000 1.49
--- LinkTagTest.java 22 Jul 2004 02:22:31 -0000 1.50
***************
*** 854,856 ****
--- 854,874 ----
assertEquals ("plain text", "Cities", linkTag.toPlainTextString ());
}
+
+ /**
+ * See bug #982175 False Positives on ® entity
+ */
+ public void testCharacterReferenceInLink() throws Exception
+ {
+ String html = "<a href=\"http://www.someplace.com/somepage.html?®ion=us\">Search By Region</a>" +
+ "<a href=\"http://www.someplace.com/somepage.html?®ion=&destination=184\">Search by Destination</a>";
+ createParser (html);
+ parseAndAssertNodeCount (2);
+ assertType("node", LinkTag.class, node[0]);
+ LinkTag linkTag = (LinkTag)node[0];
+ assertEquals ("link", "http://www.someplace.com/somepage.html?®ion=us", linkTag.getLink());
+ assertType("node", LinkTag.class, node[1]);
+ linkTag = (LinkTag)node[1];
+ assertEquals ("link", "http://www.someplace.com/somepage.html?®ion=&destination=184", linkTag.getLink());
+ }
+
}
|