Skip to content

Commit

Permalink
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/org/jcodings/specific/TestUnicode.java
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
import org.jcodings.Config;
import org.jcodings.Encoding;
import org.jcodings.IntHolder;
import org.jcodings.constants.CharacterType;
import org.junit.Test;

import static junit.framework.Assert.*;
@@ -28,6 +29,11 @@ public void testUnicodeProperties() throws Exception {
byte[]prop = "\000u\000p\000p\000e\000r".getBytes("iso-8859-1");
int ctype = enc.propertyNameToCType(prop, 0, prop.length);
assertTrue(enc.isCodeCType(code, ctype));

Encoding utf8 = UTF8Encoding.INSTANCE;
byte[]ascii = "ascii".getBytes();
int a_ctype = utf8.propertyNameToCType(ascii, 0, ascii.length);
assertEquals(a_ctype, CharacterType.ASCII);
}

String caseMap(String fromS, int flags) throws Exception {

0 comments on commit 84f8460

Please sign in to comment.