add failing test as some sort of todo / reminder

This commit is contained in:
Helium314 2025-01-05 20:37:18 +01:00
parent 4b21e3e54e
commit eb8d204d00

View file

@ -202,6 +202,21 @@ class InputLogicTest {
assertEquals("example.net", composingText)
}
// fails because
// period is not handled with handleSeparatorEvent in this case
// pickSuggestion sets phantom space state
// insertAutomaticSpaceIfOptionsAndTextAllow allows the space
// todo: fix it either in some of those functions, or by finally improving URL detection in a reasonable (and performant) way
@Test fun noAutospaceInUrlFieldWhenPickingSuggestion() {
reset()
setInputType(InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_URI)
chainInput("exam")
pickSuggestion("example")
assertEquals("example", text)
input('.')
assertEquals("example.", text)
}
@Test fun noAutospaceForDetectedUrl() { // "light" version, should work without url detection
reset()
DeviceProtectedUtils.getSharedPreferences(latinIME).edit { putBoolean(Settings.PREF_AUTOSPACE_AFTER_PUNCTUATION, true) }