ComposeTokenizer: add tests

main
Alibek Omarov 4 years ago
parent e5860b8146
commit 2cf07fc496
  1. 13
      app/src/test/java/com/keylesspalace/tusky/ComposeTokenizerTest.kt

@ -44,6 +44,19 @@ class ComposeTokenizerTest(private val text: CharSequence,
arrayOf(" @ment10n_ @ment20n_", 11, 20), arrayOf(" @ment10n_ @ment20n_", 11, 20),
arrayOf(" @ment10n_ @ment20n_n", 11, 21), arrayOf(" @ment10n_ @ment20n_n", 11, 21),
arrayOf(" @ment10n_ @ment20n_9", 11, 21), arrayOf(" @ment10n_ @ment20n_9", 11, 21),
arrayOf(" @ment10n-", 1, 10),
arrayOf(" @ment10n- @", 11, 12),
arrayOf(" @ment10n- @ment20n", 11, 19),
arrayOf(" @ment10n- @ment20n-", 11, 20),
arrayOf(" @ment10n- @ment20n-n", 11, 21),
arrayOf(" @ment10n- @ment20n-9", 11, 21),
arrayOf("@ment10n@l0calhost", 0, 18),
arrayOf(" @ment10n@l0calhost", 1, 19),
arrayOf(" @ment10n_@l0calhost", 1, 20),
arrayOf(" @ment10n-@l0calhost", 1, 20),
arrayOf(" @ment10n_@l0calhost @ment20n@huskyapp.dev", 21, 42),
arrayOf(" @ment10n_@l0calhost @ment20n_@huskyapp.dev", 21, 43),
arrayOf(" @ment10n-@l0calhost @ment20n-@huskyapp.dev", 21, 43),
arrayOf("mention", 7, 7), arrayOf("mention", 7, 7),
arrayOf("ment10n", 7, 7), arrayOf("ment10n", 7, 7),
arrayOf("mentio_", 7, 7), arrayOf("mentio_", 7, 7),

Loading…
Cancel
Save