Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
9be5ad69
Commit
9be5ad69
authored
Oct 18, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test DialArgs changes
parent
50cc0e47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
convert_test.go
convert_test.go
+6
-0
No files found.
convert_test.go
View file @
9be5ad69
...
...
@@ -141,4 +141,10 @@ func TestDialArgs(t *testing.T) {
test
(
"/ip4/127.0.0.1/tcp/4321"
,
"tcp4"
,
"127.0.0.1:4321"
)
test
(
"/ip6/::1/udp/1234"
,
"udp6"
,
"[::1]:1234"
)
test
(
"/ip6/::1/tcp/4321"
,
"tcp6"
,
"[::1]:4321"
)
test
(
"/ip6/::1"
,
"ip6"
,
"::1"
)
// Just an IP
test
(
"/ip4/1.2.3.4"
,
"ip4"
,
"1.2.3.4"
)
// Just an IP
test
(
"/ip6zone/foo/ip6/::1/tcp/4321"
,
"tcp6"
,
"[::1%foo]:4321"
)
// zone
test
(
"/ip6zone/foo/ip6/::1"
,
"ip6"
,
"::1%foo"
)
// no TCP
test
(
"/ip6zone/foo/ip6/::1/ip6zone/bar"
,
"ip6"
,
"::1%foo"
)
// IP over IP
test
(
"/ip6zone/foo/ip4/127.0.0.1/ip6zone/bar"
,
"ip4"
,
"127.0.0.1"
)
// Skip zones in IP
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment