summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/miekg/dns/parse_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/miekg/dns/parse_test.go')
-rw-r--r--vendor/github.com/miekg/dns/parse_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/miekg/dns/parse_test.go b/vendor/github.com/miekg/dns/parse_test.go
index c727c1301..2622318df 100644
--- a/vendor/github.com/miekg/dns/parse_test.go
+++ b/vendor/github.com/miekg/dns/parse_test.go
@@ -1509,3 +1509,21 @@ func TestParseURI(t *testing.T) {
}
}
}
+
+func TestParseAVC(t *testing.T) {
+ avcs := map[string]string{
+ `example.org. IN AVC "app-name:WOLFGANG|app-class:OAM|business=yes"`: `example.org. 3600 IN AVC "app-name:WOLFGANG|app-class:OAM|business=yes"`,
+ }
+ for avc, o := range avcs {
+ rr, err := NewRR(avc)
+ if err != nil {
+ t.Error("failed to parse RR: ", err)
+ continue
+ }
+ if rr.String() != o {
+ t.Errorf("`%s' should be equal to\n`%s', but is `%s'", avc, o, rr.String())
+ } else {
+ t.Logf("RR is OK: `%s'", rr.String())
+ }
+ }
+}