Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
Mock FileInfo.Sys() to return nil explicitly
Browse files Browse the repository at this point in the history
Otherwise, this function call panics on windows.
  • Loading branch information
masih committed Jul 22, 2021
1 parent 7e0b6b0 commit 73547d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ func (m *mockFileInfo) Name() string {
return m.name
}

func (m *mockFileInfo) Sys() interface{} {
return nil
}

var _ os.FileInfo = &mockFileInfo{}

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

0 comments on commit 73547d8

Please sign in to comment.