Add tests for double space behavior
Bug: 5875776 Change-Id: Icc28b6c5c0132a3afc8d603841c9e321f720b7c9
This commit is contained in:
parent
61b31a646e
commit
60e7718462
1 changed files with 15 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue