[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests ParserTestCase.java,1.44,1.45
Brought to you by:
derrickoswald
From: <der...@us...> - 2004-02-28 16:10:13
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv977/tests Modified Files: ParserTestCase.java Log Message: Fix bug #902121 StringBean throws NullPointerException. Added ScriptDecoder to handle Microsoft Script Encoder encrypted tags. Added accessor to ScriptTag's scriptCode property to be able to override it. Ensured that a Tag always has a non-null name. Skip STYLE tags in StringBean, just like SCRIPT. Index: ParserTestCase.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/ParserTestCase.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** ParserTestCase.java 14 Jan 2004 02:53:47 -0000 1.44 --- ParserTestCase.java 28 Feb 2004 15:52:43 -0000 1.45 *************** *** 108,122 **** if (expected.length() < actual.length()) { mismatchInfo = "\n\nACTUAL result has "+(actual.length()-expected.length())+" extra characters at the end. They are :"; ! ! for (int i = expected.length(); i < actual.length(); i++) { mismatchInfo += ("\nPosition : " + i + " , Code = " + (int) actual.charAt(i)); ! } } else if(expected.length() > actual.length()) { mismatchInfo = "\n\nEXPECTED result has "+(expected.length()-actual.length())+" extra characters at the end. They are :"; ! ! for (int i = actual.length(); i < expected.length(); i++) { mismatchInfo += ("\nPosition : " + i + " , Code = " + (int) expected.charAt(i)); ! } ! } for (int i = 0; i < expected.length(); i++) { --- 108,123 ---- if (expected.length() < actual.length()) { mismatchInfo = "\n\nACTUAL result has "+(actual.length()-expected.length())+" extra characters at the end. They are :"; ! int limit = Math.min (expected.length() + 10, actual.length()); ! for (int i = expected.length(); i < limit; i++) mismatchInfo += ("\nPosition : " + i + " , Code = " + (int) actual.charAt(i)); ! if (limit != actual.length()) ! mismatchInfo += "\netc."; } else if(expected.length() > actual.length()) { mismatchInfo = "\n\nEXPECTED result has "+(expected.length()-actual.length())+" extra characters at the end. They are :"; ! int limit = Math.min (actual.length() + 10, expected.length()); ! for (int i = actual.length(); i < expected.length(); i++) mismatchInfo += ("\nPosition : " + i + " , Code = " + (int) expected.charAt(i)); ! if (limit != expected.length ()) ! mismatchInfo += "\netc."; } for (int i = 0; i < expected.length(); i++) { |