summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/bugs.py b/tests/bugs.py
index dd18f31..79b30eb 100644
--- a/tests/bugs.py
+++ b/tests/bugs.py
@@ -13,6 +13,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+import binascii
import unittest
import dns.rdata
@@ -45,5 +46,11 @@ class BugsTestCase(unittest.TestCase):
"1 0 100 ABCD SCBCQHKU35969L2A68P3AD59LHF30715")
self.assertTrue(rdata.windows == [])
+ def test_APL_trailing_zero(self):
+ rd4 = dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.APL,
+ '!1:127.0.0.0/1')
+ out4 = rd4.to_digestable(dns.name.from_text("test"))
+ self.assertTrue(binascii.hexlify(out4).decode('ascii') == '000101817f')
+
if __name__ == '__main__':
unittest.main()