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

Suggestions for testing technique? #16

Open
rfay opened this issue Aug 1, 2018 · 0 comments
Open

Suggestions for testing technique? #16

rfay opened this issue Aug 1, 2018 · 0 comments

Comments

@rfay
Copy link

rfay commented Aug 1, 2018

I set up our simple command-line utility to prompt using this library, and it worked fine on macOS and Windows.

I wanted to be able to test though, and wasn't successful. With our previous (even simpler) prompting technique we were able to capture/redirect stdin/stdout and pipe in responses to the prompts to look for the correct responses, but that seems to result in empty responses using this library.

Suggestions how to test programs using this prompter? The traditional technique we've used is at https://github.com/drud/ddev/blob/165ba9902196f8b12cce68fe8b2d8725e0706231/pkg/ddevapp/config_test.go#L171-L194

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

No branches or pull requests

1 participant