[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/utilTests CharacterTranslationTest.java,1.34,1.
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-11-01 02:22:11
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/utilTests In directory sc8-pr-cvs1:/tmp/cvs-serv22279/utilTests Modified Files: CharacterTranslationTest.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: CharacterTranslationTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/utilTests/CharacterTranslationTest.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** CharacterTranslationTest.java 26 Oct 2003 19:46:27 -0000 1.34 --- CharacterTranslationTest.java 1 Nov 2003 02:22:08 -0000 1.35 *************** *** 48,52 **** assertEquals ( "character entity reference at start of string doesn't work", ! "÷ is the division sign.", Translate.decode ("÷ is the division sign.")); } --- 48,52 ---- assertEquals ( "character entity reference at start of string doesn't work", ! "\u00f7 is the division sign.", Translate.decode ("÷ is the division sign.")); } *************** *** 56,60 **** assertEquals ( "numeric character reference at start of string doesn't work", ! "÷ is the division sign.", Translate.decode ("÷ is the division sign.")); } --- 56,60 ---- assertEquals ( "numeric character reference at start of string doesn't work", ! "\u00f7 is the division sign.", Translate.decode ("÷ is the division sign.")); } *************** *** 64,68 **** assertEquals ( "character entity reference without a semicolon at start of string doesn't work", ! "÷ is the division sign.", Translate.decode ("÷ is the division sign.")); } --- 64,68 ---- assertEquals ( "character entity reference without a semicolon at start of string doesn't work", ! "\u00f7 is the division sign.", Translate.decode ("÷ is the division sign.")); } *************** *** 72,76 **** assertEquals ( "numeric character reference without a semicolon at start of string doesn't work", ! "÷ is the division sign.", Translate.decode ("÷ is the division sign.")); } --- 72,76 ---- assertEquals ( "numeric character reference without a semicolon at start of string doesn't work", ! "\u00f7 is the division sign.", Translate.decode ("÷ is the division sign.")); } *************** *** 80,85 **** assertEquals ( "character entity reference at end of string doesn't work", ! "The division sign (÷) is ÷", ! Translate.decode ("The division sign (÷) is ÷")); } --- 80,85 ---- assertEquals ( "character entity reference at end of string doesn't work", ! "The division sign (\u00f7) is \u00f7", ! Translate.decode ("The division sign (\u00f7) is ÷")); } *************** *** 88,93 **** assertEquals ( "numeric character reference at end of string doesn't work", ! "The division sign (÷) is ÷", ! Translate.decode ("The division sign (÷) is ÷")); } --- 88,93 ---- assertEquals ( "numeric character reference at end of string doesn't work", ! "The division sign (\u00f7) is \u00f7", ! Translate.decode ("The division sign (\u00f7) is ÷")); } *************** *** 96,101 **** assertEquals ( "character entity reference without a semicolon at end of string doesn't work", ! "The division sign (÷) is ÷", ! Translate.decode ("The division sign (÷) is ÷")); } --- 96,101 ---- assertEquals ( "character entity reference without a semicolon at end of string doesn't work", ! "The division sign (\u00f7) is \u00f7", ! Translate.decode ("The division sign (\u00f7) is ÷")); } *************** *** 104,109 **** assertEquals ( "numeric character reference without a semicolon at end of string doesn't work", ! "The division sign (÷) is ÷", ! Translate.decode ("The division sign (÷) is ÷")); } --- 104,109 ---- assertEquals ( "numeric character reference without a semicolon at end of string doesn't work", ! "The division sign (\u00f7) is \u00f7", ! Translate.decode ("The division sign (\u00f7) is ÷")); } *************** *** 112,117 **** assertEquals ( "character references within a string don't work", ! "Thus, the character entity reference ÷ is a more convenient form than ÷ for obtaining the division sign (÷)", ! Translate.decode ("Thus, the character entity reference ÷ is a more convenient form than ÷ for obtaining the division sign (÷)")); } --- 112,117 ---- assertEquals ( "character references within a string don't work", ! "Thus, the character entity reference \u00f7 is a more convenient form than \u00f7 for obtaining the division sign (\u00f7)", ! Translate.decode ("Thus, the character entity reference ÷ is a more convenient form than ÷ for obtaining the division sign (\u00f7)")); } *************** *** 137,141 **** "encode doesn't work", "Character entity reference: ÷, another: , numeric character reference: ♧.", ! Translate.encode ("Character entity reference: ÷, another: \u00a0, numeric character reference: \u2667.")); } --- 137,141 ---- "encode doesn't work", "Character entity reference: ÷, another: , numeric character reference: ♧.", ! Translate.encode ("Character entity reference: \u00f7, another: \u00a0, numeric character reference: \u2667.")); } |