Skip to content

Commit

Permalink
Fix glob test
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Aug 15, 2024
1 parent 3ad57ff commit 811a08d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/fileset/glob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ func TestGlobFileset(t *testing.T) {
entries, err := root.ReadDir(".")
require.NoError(t, err)

// Remove testdata folder from entries
entries = slices.DeleteFunc(entries, func(de fs.DirEntry) bool {
return de.Name() == "testdata"
})

g, err := NewGlobSet(root, []string{
"./*.go",
})
Expand All @@ -32,7 +37,6 @@ func TestGlobFileset(t *testing.T) {
files, err := g.Files()
require.NoError(t, err)

// +1 as there's one folder in ../filer
require.Equal(t, len(files), len(entries))
for _, f := range files {
exists := slices.ContainsFunc(entries, func(de fs.DirEntry) bool {
Expand Down

0 comments on commit 811a08d

Please sign in to comment.