aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2012-07-06 16:35:27 +0900
committerSatoshi Kataoka <satok@google.com>2012-07-06 16:35:27 +0900
commit46eea3c13f0e536c8cbd30c8d571de2a321e7a99 (patch)
treef88a62f73a40e8e715974eac8576cb7f49235cd8 /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parentb8add1a24ea60d28bf2436f675326f34b6a13ac1 (diff)
parent362ea3cacbe1f19625f6a75e2bd7cd5de33fe0f2 (diff)
downloadlatinime-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.java20
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. ";