tests/test-encoding-func.py
changeset 33927 853574db5b12
parent 33926 f4433f2713d0
child 33928 6c119dbfd0c0
--- a/tests/test-encoding-func.py	Sun Apr 23 12:59:42 2017 +0900
+++ b/tests/test-encoding-func.py	Sun Apr 23 13:06:23 2017 +0900
@@ -28,6 +28,12 @@
                 t[i] |= 0x80
                 self.assertFalse(encoding.isasciistr(bytes(t)))
 
+class LocalEncodingTest(unittest.TestCase):
+    def testasciifastpath(self):
+        s = b'\0' * 100
+        self.assertTrue(s is encoding.tolocal(s))
+        self.assertTrue(s is encoding.fromlocal(s))
+
 if __name__ == '__main__':
     import silenttestrunner
     silenttestrunner.main(__name__)