github.com/StackExchange/blackbox/v2@v2.0.1-0.20220331193400-d84e904973ab/pkg/bbutil/rbio_test.go (about) 1 package bbutil 2 3 import ( 4 "testing" 5 ) 6 7 func TestRunBashInputOutput(t *testing.T) { 8 9 in := "This is a test of the RBIO system.\n" 10 bin := []byte(in) 11 12 out, err := RunBashInputOutput(bin, "cat") 13 sout := string(out) 14 if err != nil { 15 t.Error(err) 16 } 17 18 if in != sout { 19 t.Errorf("not equal %q %q", in, out) 20 } 21 }