fix unescaped back-slash target

This commit is contained in:
Dominic Della Valle 2019-09-28 16:18:46 -04:00
parent 611d2a4f64
commit 2646b1d6f3

View File

@ -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) {