From 0f3a9dbafc478efdab876d994df3362783bdad94 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 25 Jan 2018 22:32:54 +0100 Subject: [PATCH] add a test for single character labels and how they compare after our 'a.root-servers.net' scare (which turned out to be unrelated) --- pdns/test-dnsname_cc.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pdns/test-dnsname_cc.cc b/pdns/test-dnsname_cc.cc index 31efaf3ce8..93ed7eb81a 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); -- 2.47.2