]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added a test to make sure raw strings don't get unicode escapes
authorBenjamin Peterson <benjamin@python.org>
Sat, 5 Apr 2008 15:09:30 +0000 (15:09 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 5 Apr 2008 15:09:30 +0000 (15:09 +0000)
Lib/test/test_unicode.py

index f7e7cb426485c51b80f7e2559be5a5ac0bbd2675..c64dee554499e1a6bcb575ca964414ed3812f5c5 100644 (file)
@@ -68,6 +68,8 @@ class UnicodeTest(
         self.assertRaises(SyntaxError, eval, '\'\\Ufffffffe\'')
         self.assertRaises(SyntaxError, eval, '\'\\Uffffffff\'')
         self.assertRaises(SyntaxError, eval, '\'\\U%08x\'' % 0x110000)
+        # raw strings should not have unicode escapes
+        self.assertNotEquals(r"\u0020", " ")
 
     def test_repr(self):
         if not sys.platform.startswith('java'):