opentofu/internal/terminal
Martin Atkins ffba8064ed terminal: StreamsForTesting helper
This is to allow convenient testing of functions that are designed to work
directly with *terminal.Streams or the individual stream objects inside.

Because the InputStream and OutputStream APIs expose directly an *os.File,
this does some extra work to set up OS-level pipes so we can capture the
output into local buffers to make test assertions against. The idea here
is to keep the tricky stuff we need for testing confined to the test
codepaths, so that the "real" codepaths don't end up needing to work
around abstractions that are otherwise unnecessary.
2021-02-10 11:51:56 -08:00
..
impl_others.go internal/terminal: Interrogate and initialize the terminal, if any 2021-01-13 15:37:04 -08:00
impl_windows.go internal/terminal: Interrogate and initialize the terminal, if any 2021-01-13 15:37:04 -08:00
panicwrap_ugh.go internal/terminal: Interrogate and initialize the terminal, if any 2021-01-13 15:37:04 -08:00
stream.go internal/terminal: Interrogate and initialize the terminal, if any 2021-01-13 15:37:04 -08:00
streams.go internal/terminal: Interrogate and initialize the terminal, if any 2021-01-13 15:37:04 -08:00
testing.go terminal: StreamsForTesting helper 2021-02-10 11:51:56 -08:00