aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputLogicTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-15 17:58:25 +0900
committerJean Chalard <jchalard@google.com>2012-03-15 18:18:52 +0900
commit6ec1209a33fe2dc151b86d3f662e22e564e2f4f8 (patch)
treeff4c2da4b74a621de4eb7b2ba0ffac028a9e3040 /tests/src/com/android/inputmethod/latin/InputLogicTests.java
parent2be7a37acfd498bfc83347597bfb8cb216a310eb (diff)
downloadlatinime-6ec1209a33fe2dc151b86d3f662e22e564e2f4f8.tar.gz
latinime-6ec1209a33fe2dc151b86d3f662e22e564e2f4f8.tar.xz
latinime-6ec1209a33fe2dc151b86d3f662e22e564e2f4f8.zip
Fix a bug where quotes and dashes are considered letters
Bug: 6174065 Change-Id: I702760d44ead0eeb60d06360aa3bb03c2ec73325
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputLogicTests.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index a6a4d9343..595fe5b10 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -554,6 +554,22 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> {
EXPECTED_RESULT, mTextView.getText().toString());
}
+ public void testAutoCorrectionWithSingleQuoteInside() {
+ final String WORD_TO_TYPE = "you'f ";
+ final String EXPECTED_RESULT = "you'd ";
+ type(WORD_TO_TYPE);
+ assertEquals("auto-correction with single quote inside",
+ EXPECTED_RESULT, mTextView.getText().toString());
+ }
+
+ public void testAutoCorrectionWithSingleQuotesAround() {
+ final String WORD_TO_TYPE = "'tgis' ";
+ final String EXPECTED_RESULT = "'this' ";
+ type(WORD_TO_TYPE);
+ assertEquals("auto-correction with single quotes around",
+ EXPECTED_RESULT, mTextView.getText().toString());
+ }
+
// A helper class to ease span tests
private static class Span {
final SpannableStringBuilder mInputText;