Skip to content
Myr

Merge pull request #158 from eparis/more-errors-in-test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

More error output if a could of _test fail

authored by Eric Paris · committed by Eric Paris · parents 664a3ab, 6e4e766 · Browse files · 1 file+6 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−3 removed

  • other:+6 added−3 removed

1 file+6 added−3 removed

modified:cobra_test.go+6 added-3 removed
630 unmodified lines
631 checkResultContains(t, x, cmdSubNoRun.Long)632}633634func TestRunnableRootCommand(t *testing.T) {635 fullSetupTest("")635 x := fullSetupTest("")636637 if rootcalled != true {638 t.Errorf("Root Function was not called")638 t.Errorf("Root Function was not called\n out:%v", x.Error)639 }640}641642func TestRunnableRootCommandNilInput(t *testing.T) {
6 unmodified lines
649 cmdEcho.AddCommand(cmdTimes)650 c.AddCommand(cmdPrint, cmdEcho)651 c.SetArgs(empty_arg)652653 c.Execute()653 err := c.Execute()654 if err != nil {655 t.Errorf("Execute() failed with %v", err)656 }657658 if rootcalled != true {659 t.Errorf("Root Function was not called")660 }
380 unmodified lines