[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/tagTests TagTest.java,1.51,1.52
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-11-01 02:22:11
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests In directory sc8-pr-cvs1:/tmp/cvs-serv22279/tagTests Modified Files: TagTest.java Log Message: Convert native characters in tests to unicode. Mostly this was the division sign (\u00f7) used in tests of character entity reference translation, but other accented characters in TagTest were also problematic. This only covers the files observed to cause failed testcases when compiled and run under the en_US.UTF-8 native encoding, i.e. non ASCII. Files were converted with the native2ascii tool supplied wth the JDK. Index: TagTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/tagTests/TagTest.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** TagTest.java 26 Oct 2003 19:46:27 -0000 1.51 --- TagTest.java 1 Nov 2003 02:22:08 -0000 1.52 *************** *** 488,492 **** public void testIncorrectInvertedCommas2() throws ParserException { ! String guts = "META NAME=\"Keywords\" CONTENT=Moscou, modernisation, politique urbaine, spécificités culturelles, municipalité, Moscou, modernisation, urban politics, cultural specificities, municipality\""; String testHTML = "<" + guts + ">"; createParser(testHTML); --- 488,492 ---- public void testIncorrectInvertedCommas2() throws ParserException { ! String guts = "META NAME=\"Keywords\" CONTENT=Moscou, modernisation, politique urbaine, sp\u00e9cificit\u00e9s culturelles, municipalit\u00e9, Moscou, modernisation, urban politics, cultural specificities, municipality\""; String testHTML = "<" + guts + ">"; createParser(testHTML); *************** *** 498,507 **** public void testIncorrectInvertedCommas3() throws ParserException { ! String testHTML = new String("<meta name=\"description\" content=\"Une base de données sur les thèses de g\"ographie soutenues en France \">"); createParser(testHTML); parseAndAssertNodeCount(1); assertTrue("Node should be a tag",node[0] instanceof Tag); Tag tag = (Tag)node[0]; ! assertEquals("Node contents","meta name=\"description\" content=\"Une base de données sur les thèses de g\"ographie soutenues en France \"",tag.getText()); } --- 498,507 ---- public void testIncorrectInvertedCommas3() throws ParserException { ! String testHTML = new String("<meta name=\"description\" content=\"Une base de donn\u00e9es sur les th\u00e8ses de g\"ographie soutenues en France \">"); createParser(testHTML); parseAndAssertNodeCount(1); assertTrue("Node should be a tag",node[0] instanceof Tag); Tag tag = (Tag)node[0]; ! assertEquals("Node contents","meta name=\"description\" content=\"Une base de donn\u00e9es sur les th\u00e8ses de g\"ographie soutenues en France \"",tag.getText()); } |