mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-05 22:43:10 +00:00
fix unescaped back-slash target
This commit is contained in:
parent
611d2a4f64
commit
2646b1d6f3
@ -66,21 +66,21 @@ func TestFromIP4(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFromUnix(t *testing.T) {
|
||||
path := "/c:/foo/bar"
|
||||
path := "/C:/foo/bar"
|
||||
if runtime.GOOS == "windows" {
|
||||
path = "c:\foo\bar"
|
||||
path = `C:\foo\bar`
|
||||
}
|
||||
testConvert(t, "/unix/c:/foo/bar", func() (ma.Multiaddr, error) {
|
||||
testConvert(t, "/unix/C:/foo/bar", func() (ma.Multiaddr, error) {
|
||||
return FromNetAddr(&net.UnixAddr{Name: path, Net: "unix"})
|
||||
})
|
||||
}
|
||||
|
||||
func TestToUnix(t *testing.T) {
|
||||
path := "/c:/foo/bar"
|
||||
path := "/C:/foo/bar"
|
||||
if runtime.GOOS == "windows" {
|
||||
path = "c:\foo\bar"
|
||||
path = `C:\foo\bar`
|
||||
}
|
||||
testToNetAddr(t, "/unix/c:/foo/bar", "unix", path)
|
||||
testToNetAddr(t, "/unix/C:/foo/bar", "unix", path)
|
||||
}
|
||||
|
||||
func TestFromIP6(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user