Skip to content

Test integration with ICU (Unicode) lib #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/net/zetetic/tests/TestSuiteRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ private List<SQLCipherTest> getTestsToRun(){
tests.add(new RawRekeyTest());
//tests.add(new MultiThreadReadWriteTest());
tests.add(new NestedTransactionsTest());
tests.add(new UnicodeTest());
return tests;
}
}
25 changes: 25 additions & 0 deletions src/main/java/net/zetetic/tests/UnicodeTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.zetetic.tests;

import android.database.Cursor;
import net.sqlcipher.database.SQLiteDatabase;

public class UnicodeTest extends SQLCipherTest {
@Override
public boolean execute(SQLiteDatabase database) {

String expected = "КАКОЙ-ТО КИРИЛЛИЧЕСКИЙ ТЕКСТ"; // SOME Cyrillic TEXT
String actual = "";
Cursor result = database.rawQuery("select UPPER('Какой-то кириллический текст') as u1", new String[]{});
if(result != null){
result.moveToFirst();
actual = result.getString(0);
result.close();
}
return actual.equals(expected);
}

@Override
public String getName() {
return "Unicode (ICU) Test";
}
}