From: Stefan Behnel Date: Wed, 12 Jan 2011 21:39:57 +0000 (+0100) Subject: additional tests for escape sequences in raw strings X-Git-Tag: 0.14.1rc0~21 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=08cb6d3a9d91cf2970582ca134864bda0bf9ea25;p=cython.git additional tests for escape sequences in raw strings --- diff --git a/tests/run/strliterals.pyx b/tests/run/strliterals.pyx index 87bd6e29..f45b867b 100644 --- a/tests/run/strliterals.pyx +++ b/tests/run/strliterals.pyx @@ -104,6 +104,27 @@ __doc__ = ur""" >>> len(u6) 7 + >>> sresc + '\\12\\\'\\"\\\\' + >>> sresc == r'\12\'\"\\' + True + >>> len(sresc) + 9 + + >>> bresc + b'\\12\\\'\\"\\\\' + >>> bresc == br'\12\'\"\\' + True + >>> len(bresc) + 9 + + >>> uresc + u'\\12\\\'\\"\\\\' + >>> bresc == ur'\12\'\"\\' + True + >>> len(uresc) + 9 + >>> newlines == "Aaa\n" True @@ -136,6 +157,10 @@ u4 = Ur"abc\x11" u5 = uR"abc\x11" u6 = UR"abc\x11" +sresc = r'\12\'\"\\' +bresc = br'\12\'\"\\' +uresc = ur'\12\'\"\\' + newlines = "Aaa\n" # T640, long literals with escapes