diff options
author | 2012-07-06 16:35:27 +0900 | |
---|---|---|
committer | 2012-07-06 16:35:27 +0900 | |
commit | 46eea3c13f0e536c8cbd30c8d571de2a321e7a99 (patch) | |
tree | f88a62f73a40e8e715974eac8576cb7f49235cd8 /tests/src/com/android/inputmethod/latin/InputLogicTests.java | |
parent | b8add1a24ea60d28bf2436f675326f34b6a13ac1 (diff) | |
parent | 362ea3cacbe1f19625f6a75e2bd7cd5de33fe0f2 (diff) | |
download | latinime-46eea3c13f0e536c8cbd30c8d571de2a321e7a99.tar.gz latinime-46eea3c13f0e536c8cbd30c8d571de2a321e7a99.tar.xz latinime-46eea3c13f0e536c8cbd30c8d571de2a321e7a99.zip |
Merge remote-tracking branch 'goog/master' into mergescript
Conflicts:
native/jni/Android.mk
Change-Id: I5e4657b0949274ce29315a2c9047db428d5455af
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTests.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index f1ccfdd1d..7790299b0 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -126,6 +126,26 @@ public class InputLogicTests extends InputTestsBase { mTextView.getText().toString()); } + public void testAutoCorrectWithSpaceThenRevert() { + final String STRING_TO_TYPE = "tgis "; + final String EXPECTED_RESULT = "tgis "; + type(STRING_TO_TYPE); + mLatinIME.onUpdateSelection(0, 0, STRING_TO_TYPE.length(), STRING_TO_TYPE.length(), -1, -1); + type(Keyboard.CODE_DELETE); + assertEquals("auto-correct with space then revert", EXPECTED_RESULT, + mTextView.getText().toString()); + } + + public void testAutoCorrectToSelfDoesNotRevert() { + final String STRING_TO_TYPE = "this "; + final String EXPECTED_RESULT = "this"; + type(STRING_TO_TYPE); + mLatinIME.onUpdateSelection(0, 0, STRING_TO_TYPE.length(), STRING_TO_TYPE.length(), -1, -1); + type(Keyboard.CODE_DELETE); + assertEquals("auto-correct with space does not revert", EXPECTED_RESULT, + mTextView.getText().toString()); + } + public void testDoubleSpace() { final String STRING_TO_TYPE = "this "; final String EXPECTED_RESULT = "this. "; |