summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {