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
Kirill Smelkov
cython
Commits
a67eabb8
Commit
a67eabb8
authored
Jan 06, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add error test case for unknown \N{...} Unicode escape name
parent
2a9d8d45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+2
-1
tests/errors/invalid_uescapeN.pyx
tests/errors/invalid_uescapeN.pyx
+7
-0
No files found.
Cython/Compiler/Parsing.py
View file @
a67eabb8
...
...
@@ -815,7 +815,8 @@ def p_string_literal(s, kind_override=None):
try
:
chrval
=
ord
(
unicodedata
.
lookup
(
systr
[
3
:
-
1
]))
except
KeyError
:
s
.
error
(
"Unknown Unicode character name %r"
%
systr
[
3
:
-
1
])
s
.
error
(
"Unknown Unicode character name %s"
%
repr
(
systr
[
3
:
-
1
]).
lstrip
(
'u'
))
elif
len
(
systr
)
in
(
6
,
10
):
chrval
=
int
(
systr
[
2
:],
16
)
if
chrval
>
1114111
:
# sys.maxunicode:
...
...
tests/errors/invalid_uescapeN.pyx
0 → 100644
View file @
a67eabb8
# mode: error
u'
\
N{GIBBET NICH}
'
_ERRORS
=
'''
3:2: Unknown Unicode character name 'GIBBET NICH'
'''
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