Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunTestConsole ¶
func RunTestConsole( t *testing.T, setup func(out FileWriter, in FileReader) error, procedure func(c ExpectConsole), )
RunTestConsole simulates a terminal for interactive tests This is mostly a adaptation of the RunTest function at [survey_test.go](https://github.com/AlecAivazis/survey/blob/e47352f914346a910cc7e1ca9f65a7ac0674449a/survey_posix_test.go#L15), but with interfaces exported to easy re-use on other packages.
Types ¶
type ExpectConsole ¶
ExpectConsole is a helper to interact if the pseudo terminal on tests
type FileReader ¶
FileReader is a simplification of the io.Stdin struct
type FileWriter ¶
FileWriter is a simplification of the io.Stdout struct
Click to show internal directories.
Click to hide internal directories.