[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/lexerTests TagTests.java,1.12,1.13
Brought to you by:
derrickoswald
From: Derrick O. <der...@us...> - 2005-03-13 14:51:56
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/lexerTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16205/tests/lexerTests Modified Files: TagTests.java Log Message: Bug #1121401 No Parsing with yahoo! By default nio.charset.CharsetDecoder replaces characters it cannot represent in the current encoding with zero, which was the value returned by the page when the Stream reached EOF. This changes the Page return value to (char)Source.EOF (-1) when the end of stream is encountered. Index: TagTests.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/lexerTests/TagTests.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TagTests.java 31 Jul 2004 16:42:31 -0000 1.12 --- TagTests.java 13 Mar 2005 14:51:46 -0000 1.13 *************** *** 43,80 **** private static final String TEST_HTML = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">" + ! "<!-- Server: sf-web2 -->" + ! "<html lang=\"en\">" + ! " <head><link rel=\"stylesheet\" type=\"text/css\" href=\"http://sourceforge.net/cssdef.php\">" + ! " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">" + ! " <TITLE>SourceForge.net: Modify: 711073 - HTMLTagParser not threadsafe as a static variable in Tag</TITLE>" + ! " <SCRIPT language=\"JavaScript\" type=\"text/javascript\">" + ! " <!--" + ! " function help_window(helpurl) {" + ! " HelpWin = window.open( 'http://sourceforge.net' + helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');" + ! " }" + ! " // -->" + ! " </SCRIPT>" + ! " <link rel=\"SHORTCUT ICON\" href=\"/images/favicon.ico\">" + ! "<!-- This is temp javascript for the jump button. If we could actually have a jump script on the server side that would be ideal -->" + ! "<script language=\"JavaScript\" type=\"text/javascript\">" + ! "<!--" + ! " function jump(targ,selObj,restore){ //v3.0" + ! " if (selObj.options[selObj.selectedIndex].value) " + ! " eval(targ+\".location='\"+selObj.options[selObj.selectedIndex].value+\"'\");" + ! " if (restore) selObj.selectedIndex=0;" + ! " }" + ! " //-->" + ! "</script>" + ! "<a href=\"http://normallink.com/sometext.html\">" + ! "<style type=\"text/css\">" + ! "<!--" + ! "A:link { text-decoration:none }" + ! "A:visited { text-decoration:none }" + ! "A:active { text-decoration:none }" + ! "A:hover { text-decoration:underline; color:#0066FF; }" + ! "-->" + ! "</style>" + ! "</head>" + ! "<body bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" link=\"#003399\" vlink=\"#003399\" alink=\"#003399\">"; private int testProgress; --- 43,80 ---- private static final String TEST_HTML = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">" + ! "<!-- Server: sf-web2 -->\n" + ! "<html lang=\"en\">\n" + ! " <head><link rel=\"stylesheet\" type=\"text/css\" href=\"http://sourceforge.net/cssdef.php\">\n" + ! " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n" + ! " <TITLE>SourceForge.net: Modify: 711073 - HTMLTagParser not threadsafe as a static variable in Tag</TITLE>\n" + ! " <SCRIPT language=\"JavaScript\" type=\"text/javascript\">\n" + ! " <!--\n" + ! " function help_window(helpurl) {\n" + ! " HelpWin = window.open( 'http://sourceforge.net' + helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');\n" + ! " }\n" + ! " // -->\n" + ! " </SCRIPT>\n" + ! " <link rel=\"SHORTCUT ICON\" href=\"/images/favicon.ico\">\n" + ! "<!-- This is temp javascript for the jump button. If we could actually have a jump script on the server side that would be ideal -->\n" + ! "<script language=\"JavaScript\" type=\"text/javascript\">\n" + ! "<!--\n" + ! " function jump(targ,selObj,restore){ //v3.0\n" + ! " if (selObj.options[selObj.selectedIndex].value)\n" + ! " eval(targ+\".location='\"+selObj.options[selObj.selectedIndex].value+\"'\");\n" + ! " if (restore) selObj.selectedIndex=0;\n" + ! " }\n" + ! " //-->\n" + ! "</script>\n" + ! "<a href=\"http://normallink.com/sometext.html\">\n" + ! "<style type=\"text/css\">\n" + ! "<!--\n" + ! "A:link { text-decoration:none }\n" + ! "A:visited { text-decoration:none }\n" + ! "A:active { text-decoration:none }\n" + ! "A:hover { text-decoration:underline; color:#0066FF; }\n" + ! "-->\n" + ! "</style>\n" + ! "</head>\n" + ! "<body bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" link=\"#003399\" vlink=\"#003399\" alink=\"#003399\">\n"; private int testProgress; *************** *** 309,314 **** } while (testProgress!=completionValue); ! for (int i=0;i<parsingThread.length;i++) { ! if (!parsingThread[i].passed()) { assertNotNull("Thread "+i+" link 1",parsingThread[i].getLink1()); assertNotNull("Thread "+i+" link 2",parsingThread[i].getLink2()); --- 309,316 ---- } while (testProgress!=completionValue); ! for (int i=0;i<parsingThread.length;i++) ! { ! if (!parsingThread[i].passed()) ! { assertNotNull("Thread "+i+" link 1",parsingThread[i].getLink1()); assertNotNull("Thread "+i+" link 2",parsingThread[i].getLink2()); |