Files
kotlin-fork/libraries/stdlib/test/text/StringUtilTest.kt
T
Ilya Gorbunov 559c1604d7 Rename Pattern to Regex.
toRegex now converts string to our regex, and toPattern converts to JVM Pattern.
2015-05-09 01:10:59 +03:00

14 lines
289 B
Kotlin

package test.text
import kotlin.*
import kotlin.test.*
import org.junit.Test as test
class StringUtilTest() {
test fun toPattern() {
val re = """foo""".toPattern()
val list = re.split("hellofoobar").toList()
assertEquals(listOf("hello", "bar"), list)
}
}