From: kami-sama Date: Wed, 4 Feb 2026 08:24:56 +0000 (+0530) Subject: net/url: add test case to ResolveReference X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=02a59322e8d0276f52e687cf60ed32f39305941f;p=gostls13.git net/url: add test case to ResolveReference This adds a test case to resolveReferenceTests to ensure that a relative path is correctly appended to a base URL that ends with a trailing slash. Change-Id: I94ea65355bb96f23acff09a3992c9dcf6e47da60 Reviewed-on: https://go-review.googlesource.com/c/go/+/741880 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt Reviewed-by: Damien Neil Auto-Submit: Michael Pratt --- diff --git a/src/net/url/url_test.go b/src/net/url/url_test.go index d099353eb2..9ba2a1231d 100644 --- a/src/net/url/url_test.go +++ b/src/net/url/url_test.go @@ -1209,6 +1209,7 @@ var resolveReferenceTests = []struct { {"http://foo.com", "bar", "http://foo.com/bar"}, {"http://foo.com/", "bar", "http://foo.com/bar"}, {"http://foo.com/bar/baz", "quux", "http://foo.com/bar/quux"}, + {"http://foo.com/bar/baz/", "quux", "http://foo.com/bar/baz/quux"}, // ... going up {"http://foo.com/bar/baz", "../quux", "http://foo.com/quux"},