From: bert hubert Date: Thu, 25 Jan 2018 21:32:54 +0000 (+0100) Subject: add a test for single character labels and how they compare after our 'a.root-servers... X-Git-Tag: dnsdist-1.3.0~118^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f3a9dbafc478efdab876d994df3362783bdad94;p=pdns add a test for single character labels and how they compare after our 'a.root-servers.net' scare (which turned out to be unrelated) --- diff --git a/pdns/test-dnsname_cc.cc b/pdns/test-dnsname_cc.cc index 31efaf3ce..93ed7eb81 100644 --- a/pdns/test-dnsname_cc.cc +++ b/pdns/test-dnsname_cc.cc @@ -15,6 +15,13 @@ using std::string; BOOST_AUTO_TEST_SUITE(dnsname_cc) BOOST_AUTO_TEST_CASE(test_basic) { + DNSName aroot("a.root-servers.net"), broot("b.root-servers.net"); + BOOST_CHECK(aroot < broot); + BOOST_CHECK(!(broot < aroot)); + BOOST_CHECK(aroot.canonCompare(broot)); + BOOST_CHECK(!broot.canonCompare(aroot)); + + string before("www.ds9a.nl."); DNSName b(before); BOOST_CHECK_EQUAL(b.getRawLabels().size(), 3);