File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
src/main/java/net/zetetic/tests Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ private List<SQLCipherTest> getTestsToRun(){
7373 tests .add (new RawRekeyTest ());
7474 //tests.add(new MultiThreadReadWriteTest());
7575 tests .add (new NestedTransactionsTest ());
76+ tests .add (new UnicodeTest ());
7677 return tests ;
7778 }
7879}
Original file line number Diff line number Diff line change 1+ package net .zetetic .tests ;
2+
3+ import android .database .Cursor ;
4+ import net .sqlcipher .database .SQLiteDatabase ;
5+
6+ public class UnicodeTest extends SQLCipherTest {
7+ @ Override
8+ public boolean execute (SQLiteDatabase database ) {
9+
10+ String expected = "КАКОЙ-ТО КИРИЛЛИЧЕСКИЙ ТЕКСТ" ; // SOME Cyrillic TEXT
11+ String actual = "" ;
12+ Cursor result = database .rawQuery ("select UPPER('Какой-то кириллический текст') as u1" , new String []{});
13+ if (result != null ){
14+ result .moveToFirst ();
15+ actual = result .getString (0 );
16+ result .close ();
17+ }
18+ return actual .equals (expected );
19+ }
20+
21+ @ Override
22+ public String getName () {
23+ return "Unicode (ICU) Test" ;
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments