projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ba9be3
)
additional tests for escape sequences in raw strings
author
Stefan Behnel
<scoder@users.berlios.de>
Wed, 12 Jan 2011 21:39:57 +0000
(22:39 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Wed, 12 Jan 2011 21:39:57 +0000
(22:39 +0100)
tests/run/strliterals.pyx
patch
|
blob
|
history
diff --git
a/tests/run/strliterals.pyx
b/tests/run/strliterals.pyx
index 87bd6e29037d695543553dec0f182725749582e7..f45b867b012b2a7134b651e7538866d15c880ea7 100644
(file)
--- 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