1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Test fix for Windows compatibility

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
This commit is contained in:
Aaron Lehmann 2021-08-12 20:02:16 -07:00
parent 97ede9df26
commit c44b90f3bf

View file

@ -398,8 +398,8 @@ func TestMatches(t *testing.T) {
pm, err := NewPatternMatcher([]string{test.pattern})
assert.NilError(t, err, desc)
parentPath := path.Dir(test.text)
parentPathDirs := strings.Split(parentPath, "/")
parentPath := filepath.Dir(filepath.FromSlash(test.text))
parentPathDirs := strings.Split(parentPath, string(os.PathSeparator))
parentMatched := false
if parentPath != "." {