This repository has been archived on 2023-05-01. You can view files and clone it, but cannot push or open issues or pull requests.
gus/request_test.go

25 lines
431 B
Go

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)
}
})
}
}