Skip to content

Commit b1ae53e

Browse files
committed
rename
1 parent 10926ad commit b1ae53e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pkg/testcoverage/coverage/cover_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func Test_findFile(t *testing.T) {
9999
return
100100
}
101101

102-
filename := path.NormalizePathInRegex("pkg/testcoverage/coverage/cover.go")
102+
filename := path.NormalizePath("pkg/testcoverage/coverage/cover.go")
103103

104104
file, noPrefixName, err := FindFile(prefix+"/"+filename, "")
105105
assert.NoError(t, err)

pkg/testcoverage/coverage/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func stripPrefix(name, prefix string) string {
4040
prefix += "/"
4141
}
4242

43-
prefix = path.NormalizePathInRegex(prefix)
43+
prefix = path.NormalizePath(prefix)
4444

4545
if i := strings.Index(name, prefix); i >= 0 {
4646
return name[i+len(prefix):]

pkg/testcoverage/path/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
const separatorToReplace = string(filepath.Separator)
1010

11-
func NormalizePathInRegex(path string) string {
11+
func NormalizePath(path string) string {
1212
if runtime.GOOS != "windows" {
1313
return path
1414
}

pkg/testcoverage/path/path_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type testCase struct {
1414
output string
1515
}
1616

17-
func Test_NormalizePathInRegex_NoWin(t *testing.T) {
17+
func Test_NormalizePath_NoWin(t *testing.T) {
1818
t.Parallel()
1919

2020
if runtime.GOOS == "windows" {
@@ -29,12 +29,12 @@ func Test_NormalizePathInRegex_NoWin(t *testing.T) {
2929
}
3030

3131
for _, tc := range tests {
32-
output := NormalizePathInRegex(tc.input)
32+
output := NormalizePath(tc.input)
3333
assert.Equal(t, tc.output, output)
3434
}
3535
}
3636

37-
func Test_NormalizePathInRegex_Win(t *testing.T) {
37+
func Test_NormalizePath_Win(t *testing.T) {
3838
t.Parallel()
3939

4040
if runtime.GOOS != "windows" {
@@ -49,7 +49,7 @@ func Test_NormalizePathInRegex_Win(t *testing.T) {
4949
}
5050

5151
for _, tc := range tests {
52-
output := NormalizePathInRegex(tc.input)
52+
output := NormalizePath(tc.input)
5353
assert.Equal(t, tc.output, output)
5454
}
5555
}

0 commit comments

Comments
 (0)