]> gitweb.fperrin.net Git - DictionaryPC.git/blobdiff - src/com/hughes/android/dictionary/parser/GeneralTest.java
it-conj (most of the way), unicode handling in strings.
[DictionaryPC.git] / src / com / hughes / android / dictionary / parser / GeneralTest.java
index 0ae53813a871bd210323fa3cae03027cda43b76d..f52ad6fabfb09b2d1a29651f0ccf2ff719c19292 100644 (file)
@@ -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"));
     }
-
+    
 }