// Copyright (c) The OpenTofu Authors // SPDX-License-Identifier: MPL-2.0 // Copyright (c) 2023 HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 package terminal import ( "fmt" "io" "os" "strings" "sync" "testing" ) // StreamsForTesting is a helper for test code that is aiming to test functions // that interact with the input and output streams. // // This particular function is for the simple case of a function that only // produces output: the returned input stream is connected to the system's // "null device", as if a user had run OpenTofu with I/O redirection like //