abcxyz / abc

Apache License 2.0
12 stars 3 forks source link

Add DialogTest to factor out common pattern for prompting tests #509

Closed drevell closed 7 months ago

drevell commented 7 months ago

We have several tests for prompting-related features that communicate with a command-under-test via stdin and stdout. These tests are currently copy-pastey, and I think aren't doing concurrency quite right. In this PR we factor out a new helper function that hides all the concurrency details and exposes a simple DialogTest() API.