Commit 466fee86 authored by xiangpengzhao's avatar xiangpengzhao

Optimize port_split_test test case.

parent 38a2c94f
...@@ -28,16 +28,18 @@ func TestSplitSchemeNamePort(t *testing.T) { ...@@ -28,16 +28,18 @@ func TestSplitSchemeNamePort(t *testing.T) {
normalized bool normalized bool
}{ }{
{ {
in: "aoeu:asdf", in: "aoeu:asdf",
name: "aoeu", name: "aoeu",
port: "asdf", port: "asdf",
valid: true, valid: true,
normalized: true,
}, { }, {
in: "http:aoeu:asdf", in: "http:aoeu:asdf",
scheme: "http", scheme: "http",
name: "aoeu", name: "aoeu",
port: "asdf", port: "asdf",
valid: true, valid: true,
normalized: true,
}, { }, {
in: "https:aoeu:", in: "https:aoeu:",
scheme: "https", scheme: "https",
...@@ -46,26 +48,34 @@ func TestSplitSchemeNamePort(t *testing.T) { ...@@ -46,26 +48,34 @@ func TestSplitSchemeNamePort(t *testing.T) {
valid: true, valid: true,
normalized: false, normalized: false,
}, { }, {
in: "https:aoeu:asdf", in: "https:aoeu:asdf",
scheme: "https", scheme: "https",
name: "aoeu", name: "aoeu",
port: "asdf", port: "asdf",
valid: true, valid: true,
normalized: true,
}, { }, {
in: "aoeu:", in: "aoeu:",
name: "aoeu", name: "aoeu",
valid: true, valid: true,
normalized: false, normalized: false,
}, { }, {
in: "aoeu",
name: "aoeu",
valid: true,
normalized: true,
}, {
in: ":asdf", in: ":asdf",
valid: false, valid: false,
}, { }, {
in: "aoeu:asdf:htns", in: "aoeu:asdf:htns",
valid: false, valid: false,
}, { }, {
in: "aoeu", in: "http::asdf",
name: "aoeu", valid: false,
valid: true, }, {
in: "http::",
valid: false,
}, { }, {
in: "", in: "",
valid: false, valid: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment