Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly use tt.golden
Browse files Browse the repository at this point in the history
FollowTheProcess committed Jul 12, 2024
1 parent 3bb58a2 commit d01a799
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions command_test.go
Original file line number Diff line number Diff line change
@@ -104,7 +104,16 @@ func TestHelp(t *testing.T) {
"test",
cli.Args([]string{"--help"}),
),
golden: "",
golden: "default-help.txt",
wantErr: false,
},
{
name: "default short",
cmd: cli.New(
"test",
cli.Args([]string{"-h"}),
),
golden: "default-help.txt",
wantErr: false,
},
}
@@ -124,7 +133,7 @@ func TestHelp(t *testing.T) {
test.Equal(t, stdout.String(), "")

// --help output should be as per the golden file
test.File(t, stderr.String(), "default-help.txt")
test.File(t, stderr.String(), tt.golden)
})
}
}

0 comments on commit d01a799

Please sign in to comment.