From: Bob Halley Date: Wed, 13 Jan 2010 22:18:48 +0000 (-0800) Subject: test that escapes of non-digits work correctly X-Git-Tag: v1.8.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d70493b95619e5686a4a0e5d06d88ad3aa199365;p=thirdparty%2Fdnspython.git test that escapes of non-digits work correctly --- diff --git a/tests/tokenizer.py b/tests/tokenizer.py index 612efac2..4f4a1bdc 100644 --- a/tests/tokenizer.py +++ b/tests/tokenizer.py @@ -166,6 +166,11 @@ class TokenizerTestCase(unittest.TestCase): t = tok.get() self.failUnless(t.ttype == dns.tokenizer.IDENTIFIER and t.value == r'ch\032ld') + def testEscapedDelimiter3(self): + tok = dns.tokenizer.Tokenizer(r'ch\ild') + t = tok.get() + self.failUnless(t.ttype == dns.tokenizer.IDENTIFIER and t.value == r'ch\ild') + def testEscapedDelimiter1u(self): tok = dns.tokenizer.Tokenizer(r'ch\ ld') t = tok.get().unescape() @@ -176,5 +181,10 @@ class TokenizerTestCase(unittest.TestCase): t = tok.get().unescape() self.failUnless(t.ttype == dns.tokenizer.IDENTIFIER and t.value == 'ch ld') + def testEscapedDelimiter3u(self): + tok = dns.tokenizer.Tokenizer(r'ch\ild') + t = tok.get().unescape() + self.failUnless(t.ttype == dns.tokenizer.IDENTIFIER and t.value == r'child') + if __name__ == '__main__': unittest.main()