diff options
author | 2012-01-25 22:11:21 -0800 | |
---|---|---|
committer | 2012-01-25 22:11:21 -0800 | |
commit | 27310ae0128ffabfb0518349c375362b526e988e (patch) | |
tree | c58d7bc7228945d2e3b69e5cdb2c911788ea280c | |
parent | 5f859f20a0bfa3b0d6995eb1fc4f3461f07e944d (diff) | |
parent | 20ec43a2652263532e41035360988567164ac311 (diff) | |
download | latinime-27310ae0128ffabfb0518349c375362b526e988e.tar.gz latinime-27310ae0128ffabfb0518349c375362b526e988e.tar.xz latinime-27310ae0128ffabfb0518349c375362b526e988e.zip |
am 20ec43a2: Merge "Add tests for double space behavior"
* commit '20ec43a2652263532e41035360988567164ac311':
Add tests for double space behavior
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTests.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index 59ca22df4..7b87be6d3 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -177,4 +177,19 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> { type(STRING_TO_TYPE); assertEquals("simple auto-correct", EXPECTED_RESULT, mTextView.getText().toString()); } + + 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, mTextView.getText().toString()); + } + + public void testCancelDoubleSpace() { + final String STRING_TO_TYPE = "tgis "; + final String EXPECTED_RESULT = "this "; + type(STRING_TO_TYPE); + type(Keyboard.CODE_DELETE); + assertEquals("double space make a period", EXPECTED_RESULT, mTextView.getText().toString()); + } } |