Commit c1b520ce authored by Benjamin Peterson's avatar Benjamin Peterson

Added a test to make sure raw strings don't get unicode escapes

parent 801efd9a
...@@ -68,6 +68,8 @@ class UnicodeTest( ...@@ -68,6 +68,8 @@ class UnicodeTest(
self.assertRaises(SyntaxError, eval, '\'\\Ufffffffe\'') self.assertRaises(SyntaxError, eval, '\'\\Ufffffffe\'')
self.assertRaises(SyntaxError, eval, '\'\\Uffffffff\'') self.assertRaises(SyntaxError, eval, '\'\\Uffffffff\'')
self.assertRaises(SyntaxError, eval, '\'\\U%08x\'' % 0x110000) self.assertRaises(SyntaxError, eval, '\'\\U%08x\'' % 0x110000)
# raw strings should not have unicode escapes
self.assertNotEquals(r"\u0020", " ")
def test_repr(self): def test_repr(self):
if not sys.platform.startswith('java'): if not sys.platform.startswith('java'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment