]> gitweb.fperrin.net Git - DictionaryPC.git/blob - 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
1 package com.hughes.android.dictionary.parser;
2
3 import static org.junit.Assert.*;
4
5 import com.hughes.util.StringUtil;
6
7 import org.apache.commons.lang3.StringEscapeUtils;
8 import org.junit.Test;
9
10 public class GeneralTest {
11
12     @Test
13     public void testEscapeHtml() {
14         // This isn't actually valid html:
15         assertEquals("IPA|/dɛɪ̯/|lang=nds", StringEscapeUtils.escapeHtml3("IPA|/dɛɪ̯/|lang=nds"));
16         // Hopefully this is:
17         assertEquals("IPA|/dɛɪ̯/|lang=nds", StringUtil.escapeToPureHtmlUnicode("IPA|/dɛɪ̯/|lang=nds"));
18     }
19     
20 }