Skip to content

Commit

Permalink
test: Add error type check in test. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgeiser authored Nov 9, 2020
1 parent 0b47fb0 commit 6c2892c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions glob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func TestGlob(t *testing.T) { // nolint:funlen
t.Run("escaped direct no match", func(t *testing.T) {
matches, err := Glob("a/\\{b\\}", WithFs(testFs(t, nil, nil)))
require.EqualError(t, err, "matching \"a/{b}\": file does not exist")
require.True(t, errors.Is(err, os.ErrNotExist))
require.Empty(t, matches)
})

Expand Down

0 comments on commit 6c2892c

Please sign in to comment.