package gus_test import ( "net/url" "testing" "tildegit.org/tjp/gus" ) func TestUnescapedQuery(t *testing.T) { table := []string{ "foo bar", } for _, test := range table { t.Run(test, func(t *testing.T) { u, _ := url.Parse("gemini://domain.com/path?" + url.QueryEscape(test)) result := gus.Request{URL: u}.UnescapedQuery() if result != test { t.Errorf("expected %q, got %q", test, result) } }) } }