mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: disable tests for functions not available on windows
R=r, Joe Poirier, rsc CC=golang-dev https://golang.org/cl/2123044
This commit is contained in:
parent
f95a2f2b97
commit
e3a0c2f6cf
6 changed files with 25 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
"testing"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// Do not test empty datagrams by default.
|
||||
|
|
@ -108,6 +109,10 @@ func TestTCPServer(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestUnixServer(t *testing.T) {
|
||||
// "unix" sockets are not supported on windows.
|
||||
if runtime.GOOS == "windows" {
|
||||
return
|
||||
}
|
||||
os.Remove("/tmp/gotest.net")
|
||||
doTest(t, "unix", "/tmp/gotest.net", "/tmp/gotest.net")
|
||||
os.Remove("/tmp/gotest.net")
|
||||
|
|
@ -177,6 +182,10 @@ func TestUDPServer(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestUnixDatagramServer(t *testing.T) {
|
||||
// "unix" sockets are not supported on windows.
|
||||
if runtime.GOOS == "windows" {
|
||||
return
|
||||
}
|
||||
for _, isEmpty := range []bool{false} {
|
||||
os.Remove("/tmp/gotest1.net")
|
||||
os.Remove("/tmp/gotest1.net.local")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue