diff options
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTests.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index 8c0ccd40b..ee3a97fab 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -133,7 +133,7 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> { } private void type(final String stringToType) { - for (int i = 0; i < stringToType.length(); ++i) { + for (int i = 0; i < stringToType.length(); i = stringToType.offsetByCodePoints(i, 1)) { type(stringToType.codePointAt(i)); } } @@ -291,4 +291,13 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> { assertEquals("manual pick then space then type", WORD1_TO_TYPE + WORD2_TO_TYPE, mTextView.getText().toString()); } + + public void testDeleteWholeComposingWord() { + final String WORD_TO_TYPE = "this"; + type(WORD_TO_TYPE); + for (int i = 0; i < WORD_TO_TYPE.length(); ++i) { + type(Keyboard.CODE_DELETE); + } + assertEquals("delete whole composing word", "", mTextView.getText().toString()); + } } |