add test for matching text records

This commit is contained in:
Miek Gieben 2014-01-11 16:32:08 +00:00
parent ef732d1050
commit 3bd18e9a56
1 changed files with 12 additions and 0 deletions

View File

@ -827,3 +827,15 @@ func TestParseRRSIGTimestamp(t *testing.T) {
}
}
}
func TestTxtEqual(t *testing.T) {
rr1 := new(TXT)
rr1.Hdr = RR_Header{Name: ".", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
rr1.Txt = []string{"a\"a", "\"", "b"}
rr2, _ := NewRR(rr1.String())
if rr1.String() != rr2.String() {
// t.Fail() // Is this a bug?
t.Logf("Two TXT records should match")
t.Logf("\n%s\n%s\n", rr1.String(), rr2.String())
}
}