@@ -38,8 +38,8 @@ func TestPreparedCommand_Run_Fail(t *testing.T) {
3838 t .Fatal ("expected shx.Command to fail" )
3939 }
4040
41- wantStderr := "go run: no go files listed\n "
42- assert .Equal (t , wantStderr , gotStderr )
41+ wantStderr := "no go files listed"
42+ assert .Contains (t , gotStderr , wantStderr )
4343}
4444
4545func TestPreparedCommand_Run_Verbose (t * testing.T ) {
@@ -91,8 +91,8 @@ func TestPreparedCommand_RunE_Fail(t *testing.T) {
9191 t .Fatal ("expected the shx.Command to fail" )
9292 }
9393
94- wantStderr := "go run: no go files listed\n "
95- assert .Equal (t , wantStderr , gotStderr )
94+ wantStderr := "no go files listed"
95+ assert .Contains (t , gotStderr , wantStderr )
9696}
9797
9898func TestPreparedCommand_RunE_Verbose (t * testing.T ) {
@@ -217,8 +217,8 @@ func TestPreparedCommand_Output_Fail(t *testing.T) {
217217 t .Fatal ("expected shx.Command to fail" )
218218 }
219219
220- wantStderr := "go run: no go files listed\n "
221- assert .Equal (t , wantStderr , gotStderr )
220+ wantStderr := "no go files listed"
221+ assert .Contains (t , gotStderr , wantStderr )
222222 assert .Empty (t , gotOutput )
223223}
224224
@@ -276,8 +276,8 @@ func TestPreparedCommand_OutputE_Fail(t *testing.T) {
276276 t .Fatal ("expected the shx.Command to fail" )
277277 }
278278
279- wantStderr := "go run: no go files listed\n "
280- assert .Equal (t , wantStderr , gotStderr )
279+ wantStderr := "no go files listed"
280+ assert .Contains (t , gotStderr , wantStderr )
281281 assert .Empty (t , gotOutput )
282282}
283283
0 commit comments