Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
08cb6d3a
Commit
08cb6d3a
authored
Jan 12, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional tests for escape sequences in raw strings
parent
6ba9be3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
tests/run/strliterals.pyx
tests/run/strliterals.pyx
+25
-0
No files found.
tests/run/strliterals.pyx
View file @
08cb6d3a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment