Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing rustyline #504

Open
Pluriscient opened this issue Mar 19, 2021 · 2 comments
Open

Testing rustyline #504

Pluriscient opened this issue Mar 19, 2021 · 2 comments
Labels

Comments

@Pluriscient
Copy link

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?

@gwenn
Copy link
Collaborator

gwenn commented Mar 19, 2021

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.

@rikhuijzer
Copy link

Possible solution at #652 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants