Skip to content

Commit

Permalink
net/url: add test of "Windows" file URL
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rsc committed Apr 3, 2014
1 parent 730db0a commit 844b625
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pkg/net/url/url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 844b625

Please sign in to comment.