Explorar el Código

Test fix for Windows compatibility

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
Aaron Lehmann hace 3 años
padre
commit
c44b90f3bf
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      pkg/fileutils/fileutils_test.go

+ 2 - 2
pkg/fileutils/fileutils_test.go

@@ -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 != "." {