package net.sergeych.toread.text

import kotlin.test.Test
import kotlin.test.assertNotEquals
import kotlin.test.assertTrue

class HyphenationTest {
    @Test
    fun selectsEnglishPluginByLanguage() {
        val hyphenated = HyphenationRegistry().hyphenate("composition", "en")

        assertNotEquals("composition", hyphenated)
        assertTrue(SoftHyphen in hyphenated)
    }

    @Test
    fun selectsRussianPluginByLanguage() {
        val hyphenated = HyphenationRegistry().hyphenate("повествование", "ru")

        assertNotEquals("повествование", hyphenated)
        assertTrue(SoftHyphen in hyphenated)
    }
}
