| // Copyright 2009 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. |
| var hosttests = []hostTest{ |
| hostTest{"loki", []IP{}}, |
| hostTest{"ullrhost", []IP{ |
| func TestLookupStaticHost(t *testing.T) { |
| hostsPath = "hosts_testdata" |
| for i := 0; i < len(hosttests); i++ { |
| ips := lookupStaticHost(tt.host) |
| if len(ips) != len(tt.ips) { |
| t.Errorf("# of hosts = %v; want %v", |
| if tt.ips[k].String() != v { |
| t.Errorf("lookupStaticHost(%q) = %v; want %v", |