Skip to content

Commit

Permalink
fix: varflag tests for flag parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Kungla <[email protected]>
  • Loading branch information
mkungla committed Jan 30, 2024
1 parent 764f2e5 commit abce1a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/vars/varflag/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ func TestNoArgs(t *testing.T) {
}
flag, _ := New(tt.name, "", "")

if ok, err := flag.Parse([]string{}); ok || !errors.Is(err, ErrParse) {
if ok, err := flag.Parse([]string{}); ok || err != nil {
t.Errorf("flag should fail to parse got %t %q", ok, err)
}
flag2, _ := New(tt.name, "", "")
if ok, err := flag2.Parse(nil); ok || !errors.Is(err, ErrParse) {
if ok, err := flag2.Parse(nil); ok || err != nil {
t.Errorf("flag should fail to parse got %t %q", ok, err)
}
})
Expand Down

0 comments on commit abce1a3

Please sign in to comment.