]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Test `dns.name.from_unicode` with escapes.
authorBrian Wellington <bwelling@xbill.org>
Wed, 17 Jun 2020 19:58:59 +0000 (12:58 -0700)
committerBrian Wellington <bwelling@xbill.org>
Wed, 17 Jun 2020 19:59:45 +0000 (12:59 -0700)
tests/test_name.py

index e6e027795d955455b66fc65c5aaed7721be77d17..67cedba76ed4bcaa237893c8b7302774f97d5a79 100644 (file)
@@ -752,6 +752,11 @@ class NameTestCase(unittest.TestCase):
                                   idna_codec=dns.name.IDNA_2008_Practical)
         self.assertEqual(str(e), '_sip._tcp.xn--knigsgchen-b4a3dun.')
 
+    def testFromUnicodeEscapes(self):
+        n = dns.name.from_unicode(r'\097.\098.\099.')
+        t = n.to_unicode()
+        self.assertEqual(t, 'a.b.c.')
+
     def testToUnicode1(self):
         n = dns.name.from_text('foo.bar')
         s = n.to_unicode()