diff options
author | Russ Cox <rsc@golang.org> | 2010-12-07 16:20:15 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-12-07 16:20:15 -0500 |
commit | 8694959b1214f87c76d08d8fdc875d5cb7f43dde (patch) | |
tree | 652293e2b902e2113ce2087e1448e4bc2e9925f4 | |
parent | cab83650d17c004e041ba8f3f6ace1f2a125f9d8 (diff) | |
download | go-8694959b1214f87c76d08d8fdc875d5cb7f43dde.tar.gz go-8694959b1214f87c76d08d8fdc875d5cb7f43dde.zip |
http: fix build
R=dsymonds
TBR=dsymonds
CC=golang-dev
https://golang.org/cl/3425044
-rw-r--r-- | src/pkg/http/url_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/pkg/http/url_test.go b/src/pkg/http/url_test.go index 59b4750aa4..447d5390ef 100644 --- a/src/pkg/http/url_test.go +++ b/src/pkg/http/url_test.go @@ -511,19 +511,20 @@ func TestUnescapeUserinfo(t *testing.T) { type qMap map[string][]string type EncodeQueryTest struct { - m qMap - expected string + m qMap + expected string + expected1 string } var encodeQueryTests = []EncodeQueryTest{ - {nil, ""}, - {qMap{"q": {"puppies"}, "oe": {"utf8"}}, "q=puppies&oe=utf8"}, - {qMap{"q": {"dogs", "&", "7"}}, "q=dogs&q=%26&q=7"}, + {nil, "", ""}, + {qMap{"q": {"puppies"}, "oe": {"utf8"}}, "q=puppies&oe=utf8", "oe=utf8&q=puppies"}, + {qMap{"q": {"dogs", "&", "7"}}, "q=dogs&q=%26&q=7", "q=dogs&q=%26&q=7"}, } func TestEncodeQuery(t *testing.T) { for _, tt := range encodeQueryTests { - if q := EncodeQuery(tt.m); q != tt.expected { + if q := EncodeQuery(tt.m); q != tt.expected && q != tt.expected1 { t.Errorf(`EncodeQuery(%+v) = %q, want %q`, tt.m, q, tt.expected) } } |