@@ -116,7 +116,7 @@ func TestCommand(t *testing.T) {
116116 ),
117117 )
118118 if verbose {
119- i .Stdout .Write ([]byte ("!!!" ))
119+ _ , _ = i .Stdout .Write ([]byte ("!!!" ))
120120 }
121121 return nil
122122 },
@@ -129,7 +129,8 @@ func TestCommand(t *testing.T) {
129129 t .Parallel ()
130130 i := cmd ().Invoke ("toupper" , "hello" )
131131 io := fakeIO (i )
132- i .Run ()
132+ err := i .Run ()
133+ require .NoError (t , err )
133134 require .Equal (t , "HELLO" , io .Stdout .String ())
134135 })
135136
@@ -139,7 +140,9 @@ func TestCommand(t *testing.T) {
139140 "up" , "hello" ,
140141 )
141142 io := fakeIO (i )
142- i .Run ()
143+ err := i .Run ()
144+ require .NoError (t , err )
145+
143146 require .Equal (t , "HELLO" , io .Stdout .String ())
144147 })
145148
@@ -326,7 +329,7 @@ func TestCommand_DeepNest(t *testing.T) {
326329 {
327330 Use : "3" ,
328331 Handler : func (i * serpent.Invocation ) error {
329- i .Stdout .Write ([]byte ("3" ))
332+ _ , _ = i .Stdout .Write ([]byte ("3" ))
330333 return nil
331334 },
332335 },
@@ -432,7 +435,7 @@ func TestCommand_RawArgs(t *testing.T) {
432435 if v := i .ParsedFlags ().Lookup ("password" ).Value .String (); v != "codershack" {
433436 return xerrors .Errorf ("password %q is wrong!" , v )
434437 }
435- i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
438+ _ , _ = i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
436439 return nil
437440 }),
438441 },
@@ -480,7 +483,7 @@ func TestCommand_RootRaw(t *testing.T) {
480483 cmd := & serpent.Cmd {
481484 RawArgs : true ,
482485 Handler : func (i * serpent.Invocation ) error {
483- i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
486+ _ , _ = i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
484487 return nil
485488 },
486489 }
@@ -497,7 +500,7 @@ func TestCommand_HyphenHyphen(t *testing.T) {
497500 t .Parallel ()
498501 cmd := & serpent.Cmd {
499502 Handler : (func (i * serpent.Invocation ) error {
500- i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
503+ _ , _ = i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
501504 return nil
502505 }),
503506 }
@@ -538,7 +541,7 @@ func TestCommand_Help(t *testing.T) {
538541 return & serpent.Cmd {
539542 Use : "root" ,
540543 HelpHandler : (func (i * serpent.Invocation ) error {
541- i .Stdout .Write ([]byte ("abdracadabra" ))
544+ _ , _ = i .Stdout .Write ([]byte ("abdracadabra" ))
542545 return nil
543546 }),
544547 Handler : (func (i * serpent.Invocation ) error {
0 commit comments