diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-04-24 20:11:36 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-04-24 20:11:36 -0400 |
commit | f5437632f486b7d0a0a181c58f113c86d032b02c (patch) | |
tree | 407388e3003a210a89f4b2128d7ad656f8b79d26 /vendor/github.com/miekg/dns/parse_test.go | |
parent | 7f68a60f8c228d5604e0566bf84cabb145d16c37 (diff) | |
download | chat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.gz chat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.bz2 chat-f5437632f486b7d0a0a181c58f113c86d032b02c.zip |
Upgrading server dependancies (#6215)
Diffstat (limited to 'vendor/github.com/miekg/dns/parse_test.go')
-rw-r--r-- | vendor/github.com/miekg/dns/parse_test.go | 18 |
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()) + } + } +} |