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

Add tests #26

Open
jwodder opened this issue Dec 2, 2023 · 0 comments
Open

Add tests #26

jwodder opened this issue Dec 2, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jwodder
Copy link
Collaborator

jwodder commented Dec 2, 2023

This project needs tests. Possible ways to implement these tests include:

  • Use an expect-style library (e.g., rexpect or expectrl) to create & interact with a test terminal in which rustyline-async is doing its thing. This may require implementing some test binary that wraps rustyline-async for invocation by the expect library.

  • Use vt100 or similar to calculate what the screen looks like while using rustyline-async and assert that it looks correct.

  • Use vhs to record interactions with some test binary that wraps rustyline-async and then assert that the display remains the same after the code changes. ratatui uses this approach for testing its examples.

@zyansheep zyansheep added the enhancement New feature or request label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants