diff options
Diffstat (limited to 'src/path/filepath/path_windows_test.go')
| -rw-r--r-- | src/path/filepath/path_windows_test.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/path/filepath/path_windows_test.go b/src/path/filepath/path_windows_test.go index e37dddcead..8553485a2d 100644 --- a/src/path/filepath/path_windows_test.go +++ b/src/path/filepath/path_windows_test.go @@ -347,7 +347,11 @@ func TestToNorm(t *testing.T) { } for _, test := range tests { - got, err := filepath.ToNorm(test.arg, stubBase) + var path string + if test.arg != "" { + path = filepath.Clean(test.arg) + } + got, err := filepath.ToNorm(path, stubBase) if err != nil { t.Errorf("toNorm(%s) failed: %v\n", test.arg, err) } else if got != test.want { @@ -439,7 +443,9 @@ func TestToNorm(t *testing.T) { continue } } - + if arg != "" { + arg = filepath.Clean(arg) + } got, err := filepath.ToNorm(arg, filepath.NormBase) if err != nil { t.Errorf("toNorm(%s) failed: %v (wd=%s)\n", arg, err, wd) |
