diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-06 19:49:01 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-06 19:49:01 +0000 |
commit | 0ce10ea1348e9afd5d0eec6bca986bfe58bac5ac (patch) | |
tree | 39530b071991b2326f881b2a30a2d82d6c133fd6 /libgo/go/net/dnsclient_unix_test.go | |
parent | 57a8bf1b0c6057ccbacb0cf79eb84d1985c2c1fe (diff) | |
download | gcc-0ce10ea1348e9afd5d0eec6bca986bfe58bac5ac.tar.gz |
libgo: Update to October 24 version of master library.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/net/dnsclient_unix_test.go')
-rw-r--r-- | libgo/go/net/dnsclient_unix_test.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libgo/go/net/dnsclient_unix_test.go b/libgo/go/net/dnsclient_unix_test.go new file mode 100644 index 00000000000..47dcb563bc5 --- /dev/null +++ b/libgo/go/net/dnsclient_unix_test.go @@ -0,0 +1,27 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package net + +import ( + "testing" +) + +func TestTCPLookup(t *testing.T) { + if testing.Short() || !*testExternal { + t.Skip("skipping test to avoid external network") + } + c, err := Dial("tcp", "8.8.8.8:53") + if err != nil { + t.Fatalf("Dial failed: %v", err) + } + defer c.Close() + cfg := &dnsConfig{timeout: 10, attempts: 3} + _, err = exchange(cfg, c, "com.", dnsTypeALL) + if err != nil { + t.Fatalf("exchange failed: %v", err) + } +} |