diff options
author | 2013-10-04 06:08:34 -0700 | |
---|---|---|
committer | 2013-10-04 06:08:34 -0700 | |
commit | c5f7d74b2bb83e99bef7aad62924b0c043ce8961 (patch) | |
tree | 9b72155b7212b61d7da4bacdb547a020a9be1dac /tests/src/com/android/inputmethod/latin/InputLogicTests.java | |
parent | 3bf2c59881ebdd4cf77099806d26f280046623bf (diff) | |
parent | 5db7eabafb75a595403309b74c86cba5d4d5486f (diff) | |
download | latinime-c5f7d74b2bb83e99bef7aad62924b0c043ce8961.tar.gz latinime-c5f7d74b2bb83e99bef7aad62924b0c043ce8961.tar.xz latinime-c5f7d74b2bb83e99bef7aad62924b0c043ce8961.zip |
am 5db7eaba: Merge "Accept double-space-period after emoji."
* commit '5db7eabafb75a595403309b74c86cba5d4d5486f':
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.java | 15 |
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() { |