We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db421f4 commit 9a291e7Copy full SHA for 9a291e7
pkg/path/path_test.go
@@ -16,11 +16,6 @@ func TestSanitizePath(t *testing.T) {
16
input: "test\x00file",
17
expected: "test_file",
18
},
19
- {
20
- name: "Path without invalid characters",
21
- input: "/usr/local/bin/test",
22
- expected: "/usr/local/bin/test",
23
- },
24
}
25
26
if runtime.GOOS == "windows" {
@@ -32,6 +27,17 @@ func TestSanitizePath(t *testing.T) {
32
27
name: "Windows style path",
33
28
input: "C:\\Program Files\\Test<:>*|",
34
29
expected: "C:\\Program Files\\Test_____",
30
+ },
31
+ )
+ } else {
+ tests = append(tests, struct {
+ name string
35
+ input string
36
+ expected string
37
+ }{
38
+ name: "Path without invalid characters",
39
+ input: "/usr/local/bin/test",
40
+ expected: "/usr/local/bin/test",
41
})
42
43
0 commit comments