"ruderich.org/simon/safcm/cmd/safcm-remote/run"
)
+// testRunner implements run.Runner to test commands without actually running
+// them.
type testRunner struct {
t *testing.T
expCmds []*exec.Cmd
exp := r.expCmds[0]
r.expCmds = r.expCmds[1:]
if !reflect.DeepEqual(exp, cmd) {
- r.t.Errorf("%s: %s", method,
- cmp.Diff(exp, cmd, cmpopts.IgnoreUnexported(
- exec.Cmd{},
- bytes.Buffer{})))
+ opts := cmpopts.IgnoreUnexported(exec.Cmd{}, bytes.Buffer{})
+ r.t.Errorf("%s: %s", method, cmp.Diff(exp, cmd, opts))
}
var stdout, stderr []byte