Skip to content

Commit

Permalink
fix: broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Mar 5, 2024
1 parent 4a9fe05 commit 8e675d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,13 @@ func TestPathMapperUsingStringPointer(t *testing.T) {
var cli CLI

t.Run("With value", func(t *testing.T) {
pwd, err := os.Getwd()
assert.NoError(t, err)
p := mustNew(t, &cli)
_, err := p.Parse([]string{"--path", "/foo/bar"})
_, err = p.Parse([]string{"--path", "."})
assert.NoError(t, err)
assert.NotZero(t, cli.Path)
assert.Equal(t, "/foo/bar", *cli.Path)
assert.Equal(t, pwd, *cli.Path)
})

t.Run("Zero value", func(t *testing.T) {
Expand Down

0 comments on commit 8e675d6

Please sign in to comment.