From: Russ Cox Date: Thu, 3 Apr 2014 20:10:33 +0000 (-0400) Subject: net/url: add test of "Windows" file URL X-Git-Tag: go1.3beta1~201 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=844b625ebcc7101e09fb87828a0e71db942a2416;p=gostls13.git net/url: add test of "Windows" file URL This is just testing the status quo, so that any future attempt to change it will make the test break and redirect the person making the change to look at issue 6027. Fixes #6027. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/83930046 --- diff --git a/src/pkg/net/url/url_test.go b/src/pkg/net/url/url_test.go index 7578eb15b9..cad758f238 100644 --- a/src/pkg/net/url/url_test.go +++ b/src/pkg/net/url/url_test.go @@ -251,6 +251,17 @@ var urltests = []URLTest{ }, "file:///home/adg/rabbits", }, + // "Windows" paths are no exception to the rule. + // See golang.org/issue/6027, especially comment #9. + { + "file:///C:/FooBar/Baz.txt", + &URL{ + Scheme: "file", + Host: "", + Path: "/C:/FooBar/Baz.txt", + }, + "file:///C:/FooBar/Baz.txt", + }, // case-insensitive scheme { "MaIlTo:webmaster@golang.org",