diff options
| author | Hiroshi Ioka <hirochachacha@gmail.com> | 2016-10-21 18:46:44 +0900 |
|---|---|---|
| committer | Alex Brainman <alex.brainman@gmail.com> | 2016-10-23 06:45:32 +0000 |
| commit | 0e7f9700f69944a993230d706e41a86ac47da415 (patch) | |
| tree | 89fe5373186aefca9be8fee6157745b897ae5027 /src/path/filepath/path_windows_test.go | |
| parent | b7477f386926e65bb99db4eb90820576f6533614 (diff) | |
| download | go-0e7f9700f69944a993230d706e41a86ac47da415.tar.xz | |
path/filepath: pass TestToNorm even if VolumeName(tmpdir) != VolumeName(pwd) on windows
Fixes #17504
Change-Id: Ic83578cf2019e5d8778e4b324f04931eb802f603
Reviewed-on: https://go-review.googlesource.com/31544
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/path/filepath/path_windows_test.go')
| -rw-r--r-- | src/path/filepath/path_windows_test.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/path/filepath/path_windows_test.go b/src/path/filepath/path_windows_test.go index 7bfa6e42a0..8d552d06f7 100644 --- a/src/path/filepath/path_windows_test.go +++ b/src/path/filepath/path_windows_test.go @@ -337,10 +337,10 @@ func TestToNorm(t *testing.T) { {`{{tmp}}\test`, `{{tmpvol}}FOO\BAR`, `{{tmpvol}}foo\bar`}, // test relative paths begin with '\' - {".", `{{tmpnovol}}\test\foo\bar`, `{{tmpnovol}}\test\foo\bar`}, - {".", `{{tmpnovol}}\.\test\foo\bar`, `{{tmpnovol}}\test\foo\bar`}, - {".", `{{tmpnovol}}\test\..\test\foo\bar`, `{{tmpnovol}}\test\foo\bar`}, - {".", `{{tmpnovol}}\TEST\FOO\BAR`, `{{tmpnovol}}\test\foo\bar`}, + {"{{tmp}}", `{{tmpnovol}}\test\foo\bar`, `{{tmpnovol}}\test\foo\bar`}, + {"{{tmp}}", `{{tmpnovol}}\.\test\foo\bar`, `{{tmpnovol}}\test\foo\bar`}, + {"{{tmp}}", `{{tmpnovol}}\test\..\test\foo\bar`, `{{tmpnovol}}\test\foo\bar`}, + {"{{tmp}}", `{{tmpnovol}}\TEST\FOO\BAR`, `{{tmpnovol}}\test\foo\bar`}, // test relative paths begin without '\' {`{{tmp}}\test`, ".", `.`}, @@ -355,7 +355,6 @@ func TestToNorm(t *testing.T) { if err != nil { t.Fatal(err) } - defer func() { err := os.Chdir(cwd) if err != nil { |
