Testing interactive input
There seems to be no way to automatically test a program using Termial.prompt(), Terminal.interactiveSelectList() or Terminal.interactiveMultiSelectList().
Would be nice if there was possible to somehow mock them when testing.
You can! Create a TerminalRecorder with the input you want to simulate, and set it as the terminalInterface on your Terminal in tests. Take a look at how mordant tests the InteractiveSelectList
Interesting. Would be nice if this was supported by https://github.com/ajalt/clikt/blob/master/clikt-mordant/src/commonMain/kotlin/com/github/ajalt/clikt/testing/CliktTesting.kt
created Clikt issue about that: https://github.com/ajalt/clikt/issues/625
Might be useful to be able to mock those input widgets on a higher lever (e.g. "user selected this element" rather than "user pressed this and that key").