aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/path_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/path/filepath/path_test.go')
-rw-r--r--src/path/filepath/path_test.go25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/path/filepath/path_test.go b/src/path/filepath/path_test.go
index 1b9f286c4d..cbddda88b6 100644
--- a/src/path/filepath/path_test.go
+++ b/src/path/filepath/path_test.go
@@ -1382,27 +1382,18 @@ func TestIssue29372(t *testing.T) {
path := f.Name()
defer os.Remove(path)
- isWin := runtime.GOOS == "windows"
pathSeparator := string(filepath.Separator)
- tests := []struct {
- path string
- skip bool
- }{
- {path + strings.Repeat(pathSeparator, 1), false},
- {path + strings.Repeat(pathSeparator, 2), false},
- {path + strings.Repeat(pathSeparator, 1) + ".", false},
- {path + strings.Repeat(pathSeparator, 2) + ".", false},
- // windows.GetFinalPathNameByHandle return the directory part with trailing dot dot
- // C:\path\to\existing_dir\existing_file\.. returns C:\path\to\existing_dir
- {path + strings.Repeat(pathSeparator, 1) + "..", isWin},
- {path + strings.Repeat(pathSeparator, 2) + "..", isWin},
+ tests := []string{
+ path + strings.Repeat(pathSeparator, 1),
+ path + strings.Repeat(pathSeparator, 2),
+ path + strings.Repeat(pathSeparator, 1) + ".",
+ path + strings.Repeat(pathSeparator, 2) + ".",
+ path + strings.Repeat(pathSeparator, 1) + "..",
+ path + strings.Repeat(pathSeparator, 2) + "..",
}
for i, test := range tests {
- if test.skip {
- continue
- }
- _, err = filepath.EvalSymlinks(test.path)
+ _, err = filepath.EvalSymlinks(test)
if err != syscall.ENOTDIR {
t.Fatalf("test#%d: want %q, got %q", i, syscall.ENOTDIR, err)
}