Skip to content

Commit

Permalink
test: add unit test for nil flagset in Context
Browse files Browse the repository at this point in the history
  • Loading branch information
WUST-mengqinyu committed Jan 14, 2022
1 parent 956b95a commit aed8ac0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions context_test.go
Expand Up @@ -112,6 +112,8 @@ func TestContext_String(t *testing.T) {
c := NewContext(nil, set, parentCtx)
expect(t, c.String("myflag"), "hello world")
expect(t, c.String("top-flag"), "hai veld")
c = NewContext(nil, nil, parentCtx)
expect(t, c.String("top-flag"), "hai veld")
}

func TestContext_Path(t *testing.T) {
Expand Down

0 comments on commit aed8ac0

Please sign in to comment.