From: Robert Bradshaw Date: Wed, 13 Aug 2008 07:33:08 +0000 (-0700) Subject: string escaping bugs X-Git-Tag: 0.9.8.1~49^2~5^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=85fee25b45392dbf52df2fdb03ebcd788e8c7377;p=cython.git string escaping bugs --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 9c002c50..73b9008a 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -622,7 +622,7 @@ def p_string_literal(s): strval = systr chars.append(strval) else: - chars.append(r'\\' + systr[1:]) + chars.append('\\' + systr[1:]) elif sy == 'NEWLINE': chars.append('\n') elif sy == 'END_STRING': diff --git a/tests/run/literalslice.pyx b/tests/run/literalslice.pyx index ea26690a..6b1ede72 100644 --- a/tests/run/literalslice.pyx +++ b/tests/run/literalslice.pyx @@ -4,8 +4,8 @@ __doc__ = u""" >>> test_unicode_ascii(2) u'c' - >>> test_unicode(2) - u'\u00e4' + >>> test_unicode(2) == u'\u00e4' + True >>> test_int_list(2) 3