Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20ec43a2 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Add tests for double space behavior"

parents 051ac1ef 60e77184
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -177,4 +177,19 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> {
        type(STRING_TO_TYPE);
        type(STRING_TO_TYPE);
        assertEquals("simple auto-correct", EXPECTED_RESULT, mTextView.getText().toString());
        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());
    }
}
}