summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/tests/rdata_caa_unittest.cc
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@isc.org>2014-02-11 09:05:59 +0100
committerMukund Sivaraman <muks@isc.org>2014-02-11 09:06:01 +0100
commita6a6cb2e33f807593e6d457bfc822a9c31ef211e (patch)
tree6085fe2f3eb86c11ce6a55a327271493751e23e7 /src/lib/dns/tests/rdata_caa_unittest.cc
parent[2512] Add some <character-string> tests for Value field (diff)
downloadkea-a6a6cb2e33f807593e6d457bfc822a9c31ef211e.tar.xz
kea-a6a6cb2e33f807593e6d457bfc822a9c31ef211e.zip
[2512] Use CharStringData when constructing from parameters too
This supports handling escapes and such when coming from the presentation format.
Diffstat (limited to 'src/lib/dns/tests/rdata_caa_unittest.cc')
-rw-r--r--src/lib/dns/tests/rdata_caa_unittest.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/dns/tests/rdata_caa_unittest.cc b/src/lib/dns/tests/rdata_caa_unittest.cc
index 05d177e00f..a2a9f9ea80 100644
--- a/src/lib/dns/tests/rdata_caa_unittest.cc
+++ b/src/lib/dns/tests/rdata_caa_unittest.cc
@@ -207,6 +207,12 @@ TEST_F(Rdata_CAA_Test, createFromParams) {
const generic::CAA rdata_caa2(0, "issue", "ca.example.net");
EXPECT_EQ(0, rdata_caa2.compare(rdata_caa));
+ const generic::CAA rdata_caa4(0, "issue", "ca.e\\xample.net");
+ EXPECT_EQ(0, rdata_caa4.compare(rdata_caa));
+
+ const generic::CAA rdata_caa5(0, "issue", "ca.e\\120ample.net");
+ EXPECT_EQ(0, rdata_caa5.compare(rdata_caa));
+
// Tag is empty
EXPECT_THROW(const generic::CAA rdata_caa3(0, "", "ca.example.net"),
isc::InvalidParameter);