Update of //cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv27338/tests
Modified Files:
FunctionalTests.java
Log Message:
fix bug #1345049 HTMLParser should not terminate a comment with --->
add static STRICT_REMARKS to Lexer class, which when true follows the specification for remarks
Index: FunctionalTests.java
===================================================================
RCS file: //cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/FunctionalTests.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** FunctionalTests.java 31 Jul 2004 16:42:33 -0000 1.56
--- FunctionalTests.java 27 May 2006 14:02:28 -0000 1.57
***************
*** 36,39 ****
--- 36,40 ----
import org.htmlparser.Parser;
import org.htmlparser.PrototypicalNodeFactory;
+ import org.htmlparser.lexer.Lexer;
import org.htmlparser.tags.ImageTag;
import org.htmlparser.util.DefaultParserFeedback;
***************
*** 57,66 ****
* identified by the parser
*/
! public void testNumImageTagsInYahooWithoutRegisteringScanners() throws ParserException {
! // First count the image tags as is
! int imgTagCount;
! int parserImgTagCount = countImageTagsWithHTMLParser();
! imgTagCount = findImageTagCount(getParser ());
! assertEquals("Image Tag Count",imgTagCount,parserImgTagCount);
}
--- 58,78 ----
* identified by the parser
*/
! public void testNumImageTagsInYahooWithoutRegisteringScanners() throws ParserException
! {
! boolean old_remark_handling = Lexer.STRICT_REMARKS;
! try
! {
! // this page is full of bad comments like <!---resources--->
! Lexer.STRICT_REMARKS = false;
! // First count the image tags as is
! int imgTagCount;
! int parserImgTagCount = countImageTagsWithHTMLParser();
! imgTagCount = findImageTagCount(getParser ());
! assertEquals("Image Tag Count",imgTagCount,parserImgTagCount);
! }
! finally
! {
! Lexer.STRICT_REMARKS = old_remark_handling;
! }
}
|