rustyline icon indicating copy to clipboard operation
rustyline copied to clipboard

Testing rustyline

Open Pluriscient opened this issue 3 years ago • 2 comments

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?

Pluriscient avatar Mar 19 '21 10:03 Pluriscient

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.

gwenn avatar Mar 19 '21 16:03 gwenn

Possible solution at https://github.com/kkawakam/rustyline/issues/652#issuecomment-1421314307.

rikhuijzer avatar Feb 07 '23 19:02 rikhuijzer