photoprism/pkg/capture/output_test.go
Michael Mayer 3e4e72b00f Backend: Move capture package to pkg/
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-01-12 14:25:58 +01:00

18 lines
255 B
Go

package capture
import (
"fmt"
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestOutput(t *testing.T) {
result := Output(func() {
fmt.Fprint(os.Stdout, "foo")
fmt.Fprint(os.Stderr, "bar")
})
assert.Equal(t, "foobar", result)
}