Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/lexerTests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24770/src/org/htmlparser/tests/lexerTests
Modified Files:
LexerTests.java
Log Message:
Incorporated patch #1450095 Fix for Bug 1445309 from Trejkaz Xaoza.
Addition of code to parse XML processing instructions.
Index: LexerTests.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/lexerTests/LexerTests.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** LexerTests.java 12 Nov 2005 16:44:54 -0000 1.27
--- LexerTests.java 19 Mar 2006 15:01:25 -0000 1.28
***************
*** 151,154 ****
--- 151,155 ----
"</head>",
"<%=head%>",
+ "<?php ?>",
"<!--head-->",
};
***************
*** 816,820 ****
assertNull ("too many nodes", lexer.nextNode ());
}
!
/**
* See bug #899413 bug in javascript end detection.
--- 817,840 ----
assertNull ("too many nodes", lexer.nextNode ());
}
!
! /**
! * Unit test for new PI parsing code.
! */
! public void testPI() throws ParserException
! {
! String html;
! Lexer lexer;
! Node node;
!
! html = "<?php print(\"<p>Hello World!</p>\"); ?>";
! lexer = new Lexer(html);
! node = lexer.nextNode();
! if (node == null)
! fail ("too few nodes");
! else
! assertStringEquals("bad html", html, node.toHtml());
! assertNull("too many nodes", lexer.nextNode());
! }
!
/**
* See bug #899413 bug in javascript end detection.
|