Browse Source

[2431] Add tests with incorrect order of class, TTL and type

Mukund Sivaraman 12 years ago
parent
commit
0333782cc1
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/lib/dns/tests/master_loader_unittest.cc

+ 8 - 0
src/lib/dns/tests/master_loader_unittest.cc

@@ -280,6 +280,14 @@ struct ErrorCase {
     { "www      FORTNIGHT   IN  A   192.0.2.1", NULL, "Invalid TTL" },
     { "www      3600    XX  A   192.0.2.1", NULL, "Invalid class" },
     { "www      3600    IN  A   bad_ip", NULL, "Invalid Rdata" },
+    { "www      IN      A   3600 192.168.2.7", NULL,
+      "Invalid Rdata (incorrect order of class, TTL and type)" },
+    { "www      A       IN  3600 192.168.2.8", NULL,
+      "Invalid Rdata (incorrect order of class, TTL and type)" },
+    { "www      3600    A   IN   192.168.2.7", NULL,
+      "Invalid Rdata (incorrect order of class, TTL and type)" },
+    { "www      A       3600 IN  192.168.2.8", NULL,
+      "Invalid Rdata (incorrect order of class, TTL and type)" },
     { "www      3600    IN", NULL, "Unexpected EOLN" },
     { "www      3600    CH  TXT nothing", NULL, "Class mismatch" },
     { "www      \"3600\"  IN  A   192.0.2.1", NULL, "Quoted TTL" },