Skip to content

Commit

Permalink
add windows ignore tests back in
Browse files Browse the repository at this point in the history
  • Loading branch information
armanrahman22 committed Jul 29, 2021
1 parent 9525b2b commit 725c315
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/ignore/ignore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ func TestIgnore_Match(t *testing.T) {
i := NewIgnore([]string{"my/files/*"})
assert.NotNil(t, i)

// Test if rules with backslashes match on windows
assert.False(t, i.Match("not/foo"))
assert.True(t, i.Match("my/files/file1"))
assert.False(t, i.Match("my/files"))

assert.False(t, i.Match(filepath.Join("not", "foo")))
assert.True(t, i.Match(filepath.Join("my", "files", "file1")))
assert.False(t, i.Match(filepath.Join("my", "files")))
Expand Down

0 comments on commit 725c315

Please sign in to comment.