diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2010-04-05 02:51:51 +0000 |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2010-04-05 02:51:51 +0000 |
commit | 034b0acdd35cc5b5fb059dc635cc39a234ed5d07 (patch) | |
tree | 190d284ba58d8d40813410d0bb70cd6c0556fb5b /Lib/test/test_codecs.py | |
parent | dd194ab37b07a6f01da7d2981e5c2a504c6bdf98 (diff) | |
download | cpython-git-034b0acdd35cc5b5fb059dc635cc39a234ed5d07.tar.gz |
fix escape_encode to return the correct consumed size
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r-- | Lib/test/test_codecs.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 8caf018259..f8563f61ae 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -835,6 +835,9 @@ class UnicodeInternalTest(unittest.TestCase): self.assertEquals(encoder(u"a")[1], 1) self.assertEquals(encoder(u"\xe9\u0142")[1], 2) + encoder = codecs.getencoder("string-escape") + self.assertEquals(encoder(r'\x00')[1], 4) + # From http://www.gnu.org/software/libidn/draft-josefsson-idn-test-vectors.html nameprep_tests = [ # 3.1 Map to nothing. |