Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_codecs.py @ 60339:1cc4d2db5cd6 legacy-trunk
fix escape_encode to return the correct consumed size
| author | Philip Jenvey <pjenvey@underboss.org> |
|---|---|
| date | Mon, 05 Apr 2010 02:51:51 +0000 |
| parents | 7e3c47354da3 |
| children | 99e9ed214aad |
line wrap: on
line diff
--- a/Lib/test/test_codecs.py Mon Apr 05 01:34:50 2010 +0000 +++ b/Lib/test/test_codecs.py Mon Apr 05 02:51:51 2010 +0000 @@ -835,6 +835,9 @@ 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.
