rustyline
rustyline copied to clipboard
Testing rustyline
What is the conventional way of testing rustyline's behaviour? I cannot find any way to DI an input stream/ output stream so would have to override those within the cargo tests.
What is advised?
If your input stream is not considered a tty, you will not be able to test rustyline's behaviour. Not tested but it seems possible to use rexpect (see #253). Another way would be to specify your own Terminal but currently you cannot.
Possible solution at https://github.com/kkawakam/rustyline/issues/652#issuecomment-1421314307.