X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2Fparser%2FGeneralTest.java;h=f52ad6fabfb09b2d1a29651f0ccf2ff719c19292;hb=525a40440419dca3964b74cb8dd6204bd738f061;hp=0ae53813a871bd210323fa3cae03027cda43b76d;hpb=1da10b30965cc320ec52cad29adfb8b420dd7b31;p=DictionaryPC.git diff --git a/src/com/hughes/android/dictionary/parser/GeneralTest.java b/src/com/hughes/android/dictionary/parser/GeneralTest.java index 0ae5381..f52ad6f 100644 --- a/src/com/hughes/android/dictionary/parser/GeneralTest.java +++ b/src/com/hughes/android/dictionary/parser/GeneralTest.java @@ -2,6 +2,8 @@ package com.hughes.android.dictionary.parser; import static org.junit.Assert.*; +import com.hughes.util.StringUtil; + import org.apache.commons.lang3.StringEscapeUtils; import org.junit.Test; @@ -9,8 +11,10 @@ public class GeneralTest { @Test public void testEscapeHtml() { - // Somehow need to escape IPA unicode specially :( - assertEquals("", StringEscapeUtils.escapeXml("IPA|/dɛɪ̯/|lang=nds")); + // This isn't actually valid html: + assertEquals("IPA|/dɛɪ̯/|lang=nds", StringEscapeUtils.escapeHtml3("IPA|/dɛɪ̯/|lang=nds")); + // Hopefully this is: + assertEquals("IPA|/dɛɪ̯/|lang=nds", StringUtil.escapeToPureHtmlUnicode("IPA|/dɛɪ̯/|lang=nds")); } - + }