-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken in Windows #1
Comments
@hairyhenderson I was fix this issue on v0.3.3 release. See test result on windows: https://ci.appveyor.com/project/zealic/xignore/builds/23476303 You need fix testcase like this: func PathEquals(t *testing.T, expected []string, actual []string) {
normalizedPaths := []string{}
for _, p := range expected {
normalizedPaths = append(normalizedPaths, filepath.FromSlash(p))
}
if len(normalizedPaths) == 0 {
require.Empty(t, actual)
} else {
require.Equal(t, normalizedPaths, actual)
}
}
func TestMatches_Folder(t *testing.T) {
matcher := NewSystemMatcher()
result, err := matcher.Matches("testdata/folder", &MatchesOptions{
Ignorefile: ".xignore",
})
require.NoError(t, err)
PathEquals(t, []string{"foo/bar/1.txt"}, result.MatchedFiles)
PathEquals(t, []string{".xignore", "foo/bar/tool/lex.txt", "foo/tar/2.txt"}, result.UnmatchedFiles)
PathEquals(t, []string{"foo/bar"}, result.MatchedDirs)
PathEquals(t, []string{"foo", "foo/bar/tool", "foo/tar"}, result.UnmatchedDirs)
} |
Thanks @zealic! I appreciate it! 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @zealic!
I'm trying to fix some long-standing bugs in the Windows build of gomplate, and it looks like
xignore
has some bugs too which are affecting this.I've set up a temporary AppVeyor CI in my fork and you can see the build failure here (just running
go test ./...
: https://ci.appveyor.com/project/hairyhenderson/xignore/builds/23459048I'll hack on it a bit to see if I can make it work.
Here's the log:
The text was updated successfully, but these errors were encountered: