]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: pass TestToNorm even if VolumeName(tmpdir) != VolumeName(pwd) on windows
authorHiroshi Ioka <hirochachacha@gmail.com>
Fri, 21 Oct 2016 09:46:44 +0000 (18:46 +0900)
committerAlex Brainman <alex.brainman@gmail.com>
Sun, 23 Oct 2016 06:45:32 +0000 (06:45 +0000)
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>
src/path/filepath/path_windows_test.go

index 7bfa6e42a0eec76a0649c3f2ce309db20079801e..8d552d06f754ae67644b04a93359f2ff101b2914 100644 (file)
@@ -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 {