[K/N][tests] Migrate console runtime tests to new testing infra ^KT-61259

This commit is contained in:
Alexander Shabalin
2023-11-01 13:32:25 +01:00
committed by Space Team
parent 2abf9bccba
commit 6ca8f546fe
62 changed files with 311 additions and 347 deletions
@@ -0,0 +1,16 @@
// INPUT_DATA_FILE: readln.in
import kotlin.test.*
fun main() {
assertEquals("first", readln())
assertEquals("", readln())
assertEquals("second", readln())
// NOTE: Between `bbb` and `c` is "\r\n". `readln()` treats it as a single line separator on all platforms.
assertContentEquals("aaaaaa\rbbb".encodeToByteArray(), readln().encodeToByteArray())
assertEquals("c", readln())
assertEquals("Привет!", readln())
assertEquals("A very long line of input with length of more than initial buffer size", readln())
assertNull(readlnOrNull())
assertFailsWith<RuntimeException> { readln() }
}