ComposeTokenizer: add tests

This commit is contained in:
Alibek Omarov 2021-01-31 05:41:12 +03:00
parent e5860b8146
commit cca59c7192

View File

@ -44,6 +44,29 @@ class ComposeTokenizerTest(private val text: CharSequence,
arrayOf(" @ment10n_ @ment20n_", 11, 20),
arrayOf(" @ment10n_ @ment20n_n", 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@husky", 21, 35),
arrayOf(" @ment10n_@l0calhost @ment20n_@husky", 21, 36),
arrayOf(" @ment10n-@l0calhost @ment20n-@husky", 21, 36),
arrayOf(" @m@localhost", 1, 13),
arrayOf(" @m@localhost @a@localhost", 14, 26),
arrayOf("@m@", 0, 3),
arrayOf(" @m@ @a@asdf", 5, 12),
arrayOf(" @m@ @a@", 5, 8),
arrayOf(" @m@ @a@a", 5, 9),
arrayOf(" @m@a @a@m", 6, 10),
arrayOf("@m@m@", 5, 5),
arrayOf("#tusky@husky", 12, 12),
arrayOf(":tusky@husky", 12, 12),
arrayOf("mention", 7, 7),
arrayOf("ment10n", 7, 7),
arrayOf("mentio_", 7, 7),