java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.htmlparser.tests.ParserTestCase
org.htmlparser.tests.parserHelperTests.StringParserTest
- All Implemented Interfaces:
- junit.framework.Test
- public class StringParserTest
- extends org.htmlparser.tests.ParserTestCase
| Fields inherited from class junit.framework.TestCase |
|
|
Method Summary |
void |
testEmptyLines()
|
void |
testLastLineWithOneChar()
Based on a bug report submitted by Cedric Rosa, if the last line contains
a single character, StringNode does not return the string node correctly. |
void |
testStringBeingMissedBug()
This is a bug reported by John Zook (586222), where the first few chars
before a remark is being missed, if its on the same line. |
void |
testStringNodeBug1()
The bug being reproduced is this :
<HTML><HEAD><TITLE>Google</TITLE>
The above line is incorrectly parsed in that, the text Google is missed. |
void |
testStringNodeBug2()
Bug reported by Kaarle Kaila of Nokia
For the following HTML : view these documents, you must have <A
href='http://www.adobe.com'>Adobe
Acrobat Reader</A> installed on your computer.
The first string before the link is not identified, and the space after
the link is also not identified Creation date: (8/2/2001 2:07:32 AM) |
void |
testStringParserBug()
An attempt to reproduce bug 677176, which passes. |
void |
testStringWithEmptyLine()
|
void |
testStringWithLineBreaks()
|
void |
testTagCharsInStringNode()
Bug reported by Roger Sollberger
For the following HTML : <a href="http://asgard.ch">[< ASGARD
></a><br> The string node is not correctly identified |
void |
testToHTML()
|
void |
testToPlainTextString()
|
| Methods inherited from class org.htmlparser.tests.ParserTestCase |
assertHiddenIDTagPresent, assertNodeCount, assertNodeCount, assertSameType, assertStringEquals, assertTagEquals, assertType, assertXmlEquals, createParser, createParser, createParser, createParser, parse, parseAndAssertNodeCount, parseNodes, removeEscapeCharacters |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
StringParserTest
public StringParserTest(java.lang.String name)
testStringNodeBug1
public void testStringNodeBug1()
throws org.htmlparser.util.ParserException
- The bug being reproduced is this :
<HTML><HEAD><TITLE>Google</TITLE>
The above line is incorrectly parsed in that, the text Google is missed.
The presence of this bug is typically when some tag is identified before
the string node is. (usually seen with the end tag). The bug lies in
NodeReader.readElement(). Creation date: (6/17/2001 4:01:06 PM)
testStringNodeBug2
public void testStringNodeBug2()
throws org.htmlparser.util.ParserException
- Bug reported by Kaarle Kaila of Nokia
For the following HTML : view these documents, you must have <A
href='http://www.adobe.com'>Adobe
Acrobat Reader</A> installed on your computer.
The first string before the link is not identified, and the space after
the link is also not identified Creation date: (8/2/2001 2:07:32 AM)
testTagCharsInStringNode
public void testTagCharsInStringNode()
throws org.htmlparser.util.ParserException
- Bug reported by Roger Sollberger
For the following HTML : <a href="http://asgard.ch">[< ASGARD
></a><br> The string node is not correctly identified
testToPlainTextString
public void testToPlainTextString()
throws org.htmlparser.util.ParserException
testToHTML
public void testToHTML()
throws org.htmlparser.util.ParserException
testEmptyLines
public void testEmptyLines()
throws org.htmlparser.util.ParserException
testStringBeingMissedBug
public void testStringBeingMissedBug()
throws org.htmlparser.util.ParserException
- This is a bug reported by John Zook (586222), where the first few chars
before a remark is being missed, if its on the same line.
testLastLineWithOneChar
public void testLastLineWithOneChar()
throws org.htmlparser.util.ParserException
- Based on a bug report submitted by Cedric Rosa, if the last line contains
a single character, StringNode does not return the string node correctly.
testStringWithEmptyLine
public void testStringWithEmptyLine()
throws org.htmlparser.util.ParserException
testStringParserBug
public void testStringParserBug()
throws java.lang.Exception
- An attempt to reproduce bug 677176, which passes.
testStringWithLineBreaks
public void testStringWithLineBreaks()
throws java.lang.Exception