aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-07-05 11:43:03 +0900
committerJean Chalard <jchalard@google.com>2012-07-06 13:07:30 +0900
commit0e9e7e337defe97d4ede8c59d0e925f5401f9292 (patch)
tree712a9a4900a7ff6733e944b85380b7aca10c91c1 /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent29eeef75ec6987f7cd82c70ba162376b77e4fde5 (diff)
downloadlatinime-0e9e7e337defe97d4ede8c59d0e925f5401f9292.tar.gz
latinime-0e9e7e337defe97d4ede8c59d0e925f5401f9292.tar.xz
latinime-0e9e7e337defe97d4ede8c59d0e925f5401f9292.zip
Cleanup (A57)
We stopped cancelling manual picks a few weeks ago. This code is dead. Change-Id: I4032fcc3c95e9379f1839fe860a1b8a9bd7d0bc7
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. ";