aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-10-04 13:05:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-04 13:05:43 +0000
commit5db7eabafb75a595403309b74c86cba5d4d5486f (patch)
treecf555db80b733e8601e7757517224eb3e172be7a /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent1d188a28fb0930217098fef10937674e24ca5a49 (diff)
parent8142fd83a6ed8dd6741579f724ebda9e2b70dd01 (diff)
downloadlatinime-5db7eabafb75a595403309b74c86cba5d4d5486f.tar.gz
latinime-5db7eabafb75a595403309b74c86cba5d4d5486f.tar.xz
latinime-5db7eabafb75a595403309b74c86cba5d4d5486f.zip
Merge "Accept double-space-period after emoji."
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputLogicTests.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index cc2569f5e..6bc8b9dd5 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -179,10 +179,17 @@ public class InputLogicTests extends InputTestsBase {
}
public void testDoubleSpace() {
- final String STRING_TO_TYPE = "this ";
- final String EXPECTED_RESULT = "this. ";
- type(STRING_TO_TYPE);
- assertEquals("double space make a period", EXPECTED_RESULT, mEditText.getText().toString());
+ // U+1F607 is an emoji
+ final String[] STRINGS_TO_TYPE =
+ new String[] { "this ", "a+ ", "\u1F607 ", ".. ", ") ", "( ", "% " };
+ final String[] EXPECTED_RESULTS =
+ new String[] { "this. ", "a+. ", "\u1F607. ", ".. ", "). ", "( ", "% " };
+ for (int i = 0; i < STRINGS_TO_TYPE.length; ++i) {
+ mEditText.setText("");
+ type(STRINGS_TO_TYPE[i]);
+ assertEquals("double space processing", EXPECTED_RESULTS[i],
+ mEditText.getText().toString());
+ }
}
public void testCancelDoubleSpace() {