diff options
author | Filippo Valsorda <filippo@golang.org> | 2019-01-23 19:12:46 -0500 |
---|---|---|
committer | Filippo Valsorda <filippo@golang.org> | 2019-01-23 19:12:46 -0500 |
commit | 4b76b996cb0ad7ba015b53c932e7f0cc4933da77 (patch) | |
tree | b0a44524841098b76bbc018bd17a72f9118b51b1 /src/net/lookup_test.go | |
parent | 8b246fe0f5950315035944868b0523e6d75d1171 (diff) | |
parent | b0cb374daf646454998bac7b393f3236a2ab6aca (diff) | |
download | go-dev.boringcrypto.go1.10.tar.gz go-dev.boringcrypto.go1.10.zip |
[dev.boringcrypto.go1.10] all: merge go1.10.8 into dev.boringcrypto.go1.10dev.boringcrypto.go1.10
Change-Id: Iba5a8ddb67cfd119cf05274be79b840862009b4d
Diffstat (limited to 'src/net/lookup_test.go')
-rw-r--r-- | src/net/lookup_test.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go index 24787ccf2b..01901e6217 100644 --- a/src/net/lookup_test.go +++ b/src/net/lookup_test.go @@ -184,11 +184,16 @@ func TestLookupGmailTXT(t *testing.T) { if len(txts) == 0 { t.Error("got no record") } + found := false for _, txt := range txts { - if !strings.Contains(txt, tt.txt) || (!strings.HasSuffix(txt, tt.host) && !strings.HasSuffix(txt, tt.host+".")) { - t.Errorf("got %s; want a record containing %s, %s", txt, tt.txt, tt.host) + if strings.Contains(txt, tt.txt) && (strings.HasSuffix(txt, tt.host) || strings.HasSuffix(txt, tt.host+".")) { + found = true + break } } + if !found { + t.Errorf("got %v; want a record containing %s, %s", txts, tt.txt, tt.host) + } } } |