summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codecs.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r--Lib/test/test_codecs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 8caf018..f8563f6 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.