TestEnvironment

A helper used to prepare the test environment. Sets up stdout and stderr buffering so that test runner can capture full test output. Used with tests that print something to standard output or stderr.

Workaround for https://youtrack.jetbrains.com/issue/KT-69709/

Functions

Link copied to clipboard
fun cleanup()

Method be called after each test. Flushes stdout/stderr.

Link copied to clipboard
fun prepare()

Method to be called before each test. Turns off buffering of standard input/output.

Link copied to clipboard
inline fun <R : Any> use(crossinline block: () -> R)