Browse Source

[2384] Test leading zeroes in TTL

Michal 'vorner' Vaner 12 years ago
parent
commit
4ddb739a13
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/lib/dns/tests/rrttl_unittest.cc

+ 2 - 0
src/lib/dns/tests/rrttl_unittest.cc

@@ -110,6 +110,8 @@ TEST_F(RRTTLTest, fromTextUnit) {
     EXPECT_EQ(4294967295, RRTTL("4294967295S").getValue());
     EXPECT_EQ(0, RRTTL("0W0D0H0M0S").getValue());
     EXPECT_EQ(4294967295, RRTTL("1193046H1695S").getValue());
+    // Leading zeroes are accepted
+    EXPECT_EQ(4294967295, RRTTL("0000000000000004294967295S").getValue());
 
     // Now some compound ones. We allow any order (it would be much work to
     // check the order anyway). The last part can be without unit, in which