AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 349 forks source link

Show transformed answer after submitting input #450

Closed twelvelabs closed 1 year ago

twelvelabs commented 1 year ago

Fixes #449.

I tried to use the existing go-expect tooling to test this, but had a hard time figuring out how to do so :grimacing:. No amount of fiddling w/ Console (or the Expect* methods) seemed to be able to get at the output written by Prompt.Confirm(). If there's a better way to do this, please let me know and I'll update.

twelvelabs commented 1 year ago

/cc @AlecAivazis @mislav 👀

twelvelabs commented 1 year ago

Ah, it seems I misunderstood the failure message when I originally tried using ExpectString(). That was what I was going for - thanks!

LGTM 👍