소스 검색

Test fix for Windows compatibility

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
Aaron Lehmann 4 년 전
부모
커밋
c44b90f3bf
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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 != "." {