org.htmlparser.tests.tagTests
Class TagTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.htmlparser.tests.ParserTestCase
              extended byorg.htmlparser.tests.tagTests.TagTest
All Implemented Interfaces:
junit.framework.Test

public class TagTest
extends ParserTestCase


Field Summary
 
Fields inherited from class org.htmlparser.tests.ParserTestCase
mLexer, node, nodeCount, parser
 
Constructor Summary
TagTest(java.lang.String name)
           
 
Method Summary
 void testAttributesReconstruction()
           
 void testBodyTagBug1()
          The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified.
 void testBrokenTag()
          Bug report by Cedric Rosa, causing null pointer exceptions when encountering a broken tag, and if this has no further lines to parse
 void testEmptyTag()
          Ignore empty tags.
 void testEmptyTag2()
          Ignore empty tags.
 void testEmptyTag3()
          Ignore empty tags.
 void testEmptyTag4()
          Ignore empty tags.
 void testEmptyTag5()
          Ignore empty tags.
 void testEmptyTag6()
          Ignore empty tags.
 void testEmptyTagParseParameter()
          Test parseParameter method Created by Kaarle Kaila (09 Jan 2003) This test just wants the text in the element
 void testHTMLOutputOfDifficultLinksWithRegisterScanners()
          See bug #741026 registerScanners() mangles output HTML badly.
 void testIgnoreState()
           
 void testIncorrectInvertedCommas()
           
 void testIncorrectInvertedCommas2()
           
 void testIncorrectInvertedCommas3()
           
 void testLargeTagBug()
          The following should be identified as a tag :
<MYTAG abcd\n"+ "efgh\n"+ "ijkl\n"+ "mnop> Creation date: (6/17/2001 5:27:42 PM)
 void testNestedTags()
          Bug reported by Gordon Deudney 2002-03-15 Nested JSP Tags were not working
 void testParameterChange()
          See bug #740411 setParsed() has no effect on output.
 void testParseParameter3()
          Test parseParameter method Created by Kaarle Kaila (august 2001) the tag name is here G
 void testParseParameterA()
          Test parseParameter method Created by Kaarle Kaila (august 2001) the tag name is here A (and should be eaten up by linkScanner)
 void testParseParameterG()
          Test parseParameter method Created by Kaarle Kaila (august 2001) the tag name is here G
 void testParseParameterSpace()
          Test parseParameter method Created by Kaarle Kaila (august 2002) the tag name is here A (and should be eaten up by linkScanner) Tests elements where = sign is surrounded by spaces
 void testSetText()
          See bug #726913 toHtml() method incomplete
 void testStrictParsing()
          Reproduction of a bug reported by Annette Doyle This is actually a pretty good example of dirty html - we are in a fix here, bcos the font tag (the first one) has an erroneous inverted comma.
 void testStyleSheetTag()
           
 void testTabText()
          From oyoaha
 void testTagInsideTag()
           
 void testToHTML()
           
 void testWithoutParseParameter()
          Test parseParameter method Created by Kaarle Kaila (22 Oct 2001) This test just wants the text in the element
 
Methods inherited from class org.htmlparser.tests.ParserTestCase
assertHiddenIDTagPresent, assertNodeCount, assertNodeCount, assertSameType, assertStringEquals, assertSuperType, assertTagEquals, assertType, assertXmlEquals, createParser, createParser, createParser, createParser, failWithMessage, getParser, main, parse, parseAndAssertNodeCount, parseNodes, removeEscapeCharacters, setParser
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TagTest

public TagTest(java.lang.String name)
Method Detail

testBodyTagBug1

public void testBodyTagBug1()
                     throws ParserException
The bug being reproduced is this :
<BODY aLink=#ff0000 bgColor=#ffffff link=#0000cc onload=setfocus() text=#000000
vLink=#551a8b> The above line is incorrectly parsed in that, the BODY tag is not identified.

Throws:
ParserException

testLargeTagBug

public void testLargeTagBug()
                     throws ParserException
The following should be identified as a tag :
<MYTAG abcd\n"+ "efgh\n"+ "ijkl\n"+ "mnop> Creation date: (6/17/2001 5:27:42 PM)

Throws:
ParserException

testNestedTags

public void testNestedTags()
                    throws ParserException
Bug reported by Gordon Deudney 2002-03-15 Nested JSP Tags were not working

Throws:
ParserException

testParseParameter3

public void testParseParameter3()
                         throws ParserException
Test parseParameter method Created by Kaarle Kaila (august 2001) the tag name is here G

Throws:
ParserException

testParseParameterA

public void testParseParameterA()
                         throws ParserException
Test parseParameter method Created by Kaarle Kaila (august 2001) the tag name is here A (and should be eaten up by linkScanner)

Throws:
ParserException

testParseParameterG

public void testParseParameterG()
                         throws ParserException
Test parseParameter method Created by Kaarle Kaila (august 2001) the tag name is here G

Throws:
ParserException

testParseParameterSpace

public void testParseParameterSpace()
                             throws ParserException
Test parseParameter method Created by Kaarle Kaila (august 2002) the tag name is here A (and should be eaten up by linkScanner) Tests elements where = sign is surrounded by spaces

Throws:
ParserException

testStrictParsing

public void testStrictParsing()
                       throws ParserException
Reproduction of a bug reported by Annette Doyle This is actually a pretty good example of dirty html - we are in a fix here, bcos the font tag (the first one) has an erroneous inverted comma. In Tag, we ignore anything in inverted commas, and dont if its outside. This kind of messes up our parsing almost completely.

Throws:
ParserException

testToHTML

public void testToHTML()
                throws ParserException
Throws:
ParserException

testWithoutParseParameter

public void testWithoutParseParameter()
                               throws ParserException
Test parseParameter method Created by Kaarle Kaila (22 Oct 2001) This test just wants the text in the element

Throws:
ParserException

testEmptyTagParseParameter

public void testEmptyTagParseParameter()
                                throws ParserException
Test parseParameter method Created by Kaarle Kaila (09 Jan 2003) This test just wants the text in the element

Throws:
ParserException

testStyleSheetTag

public void testStyleSheetTag()
                       throws ParserException
Throws:
ParserException

testBrokenTag

public void testBrokenTag()
                   throws ParserException
Bug report by Cedric Rosa, causing null pointer exceptions when encountering a broken tag, and if this has no further lines to parse

Throws:
ParserException

testTagInsideTag

public void testTagInsideTag()
                      throws ParserException
Throws:
ParserException

testIncorrectInvertedCommas

public void testIncorrectInvertedCommas()
                                 throws ParserException
Throws:
ParserException

testIncorrectInvertedCommas2

public void testIncorrectInvertedCommas2()
                                  throws ParserException
Throws:
ParserException

testIncorrectInvertedCommas3

public void testIncorrectInvertedCommas3()
                                  throws ParserException
Throws:
ParserException

testEmptyTag

public void testEmptyTag()
                  throws ParserException
Ignore empty tags.

Throws:
ParserException

testEmptyTag2

public void testEmptyTag2()
                   throws ParserException
Ignore empty tags.

Throws:
ParserException

testEmptyTag3

public void testEmptyTag3()
                   throws ParserException
Ignore empty tags.

Throws:
ParserException

testEmptyTag4

public void testEmptyTag4()
                   throws ParserException
Ignore empty tags.

Throws:
ParserException

testEmptyTag5

public void testEmptyTag5()
                   throws ParserException
Ignore empty tags.

Throws:
ParserException

testEmptyTag6

public void testEmptyTag6()
                   throws ParserException
Ignore empty tags.

Throws:
ParserException

testAttributesReconstruction

public void testAttributesReconstruction()
                                  throws ParserException
Throws:
ParserException

testIgnoreState

public void testIgnoreState()
                     throws ParserException
Throws:
ParserException

testSetText

public void testSetText()
                 throws ParserException
See bug #726913 toHtml() method incomplete

Throws:
ParserException

testTabText

public void testTabText()
                 throws ParserException
From oyoaha

Throws:
ParserException

testHTMLOutputOfDifficultLinksWithRegisterScanners

public void testHTMLOutputOfDifficultLinksWithRegisterScanners()
                                                        throws ParserException
See bug #741026 registerScanners() mangles output HTML badly.

Throws:
ParserException

testParameterChange

public void testParameterChange()
                         throws ParserException
See bug #740411 setParsed() has no effect on output.

Throws:
ParserException