mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 00:20:05 -06:00
ffba8064ed
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. |
||
---|---|---|
.. | ||
impl_others.go | ||
impl_windows.go | ||
panicwrap_ugh.go | ||
stream.go | ||
streams.go | ||
testing.go |