summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2021-02-05 07:51:11 +0000
committerclsr <clsr@clsr.net>2021-02-05 07:51:11 +0000
commit62ed9f3969e6d38eab9f843c398e97cdb6586329 (patch)
treef6a7e7ffc6bf11fdb6105a3265300378c75e5471
parent7ebd4e0f07481bc4cbc643241a42b486f66c9df2 (diff)
downloadcnp-go-62ed9f3969e6d38eab9f843c398e97cdb6586329.tar.gz
cnp-go-62ed9f3969e6d38eab9f843c398e97cdb6586329.zip
Update testsHEADmaster
-rw-r--r--go.mod3
-rw-r--r--request_test.go4
2 files changed, 5 insertions, 2 deletions
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..8e55b66
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module contnet.org/lib/cnp-go
+
+go 1.12
diff --git a/request_test.go b/request_test.go
index 23b8ac0..8a1ceb1 100644
--- a/request_test.go
+++ b/request_test.go
@@ -158,7 +158,7 @@ var requestURLTests = []requestURLTest{
{"/example.com/path/", "", "/example.com/path/", nil},
{"/foo/bar", "", "/foo/bar", nil},
{"/", "", "/", nil},
- {"cnp://example.com/ ™☺)\n", "example.com", "/ ™☺)\n", nil},
+ {"cnp://example.com/ ん™☺)%0A", "example.com", "/ ん™☺)\n", nil},
{"cnp://œ¤å₥¶ḹə.©°ɱ/baz/../foo/.//bar////.//../bar//", "œ¤å₥¶ḹə.©°ɱ", "/foo/bar/", nil},
{"cnp://foo/bar/", "foo", "/bar/", nil},
{"cnp:///foo/bar/", "", "/foo/bar/", nil},
@@ -311,7 +311,7 @@ var urlTests = map[string]string{
"[::1]/foo bar": "cnp://[::1]/foo%20bar",
"[2001:db8::7334]/foo\nbar": "cnp://[2001:db8::7334]/foo%0Abar",
"example.com/qwe asd": "cnp://example.com/qwe%20asd",
- "example.com/ ™☺)\n": "cnp://example.com/%20%E2%84%A2%E2%98%BA%29%0A",
+ "example.com/ ん™☺)\n": "cnp://example.com/%20%E3%82%93%E2%84%A2%E2%98%BA%29%0A",
}
func TestRequestURL(t *testing.T) {