Remove format test
This commit is contained in:
parent
5d8dbab4c8
commit
aa1047c551
|
@ -1338,35 +1338,6 @@ func TestNewRRSpecial(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestPrintfVerbs(t *testing.T) {
|
||||
x, _ := NewRR("www.miek.nl. IN A 127.0.0.1")
|
||||
if fmt.Sprintf("%N", x) != "www.miek.nl." {
|
||||
t.Errorf("%%N does not return name")
|
||||
}
|
||||
if fmt.Sprintf("%C", x) != "IN" {
|
||||
t.Errorf("%%C does not return class")
|
||||
}
|
||||
if fmt.Sprintf("%D", x) != "3600" {
|
||||
t.Errorf("%%D does not return ttl")
|
||||
}
|
||||
if fmt.Sprintf("%Y", x) != "A" {
|
||||
t.Errorf("%%Y does not return type")
|
||||
}
|
||||
if fmt.Sprintf("%Y %d", x, 5) != "A 5" {
|
||||
t.Errorf("%%N does not return name")
|
||||
}
|
||||
if fmt.Sprintf("%s", x) != "www.miek.nl.\t3600\tIN\tA\t127.0.0.1" {
|
||||
t.Errorf("%%s does return the correct string")
|
||||
}
|
||||
if fmt.Sprintf("%T", x) != "*dns.A" {
|
||||
t.Errorf("%%T does return the correct string")
|
||||
}
|
||||
if fmt.Sprintf("%v", x) != "" {
|
||||
t.Errorf("%v", x)
|
||||
t.Errorf("%%v does return the correct string")
|
||||
}
|
||||
}
|
||||
|
||||
func TestPrintfVerbsRdata(t *testing.T) {
|
||||
x, _ := NewRR("www.miek.nl. IN MX 20 mx.miek.nl.")
|
||||
if Field(x, 1) != "20" {
|
||||
|
|
Loading…
Reference in New Issue