From 0be3c70cd88da39ee4dcc328ba3bde1e5abcd406 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 7 Sep 2015 17:19:17 +0100 Subject: py/lexer: Raise SyntaxError when unicode char point out of range. --- tests/unicode/unicode.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/unicode/unicode.py') diff --git a/tests/unicode/unicode.py b/tests/unicode/unicode.py index 57075f7e3..3ed74b790 100644 --- a/tests/unicode/unicode.py +++ b/tests/unicode/unicode.py @@ -20,3 +20,9 @@ print(enc, enc.decode() == s) # printing of unicode chars using repr # TODO we don't do this correctly #print(repr(s)) + +# test invalid escape code +try: + eval('"\\U00110000"') +except SyntaxError: + print('SyntaxError') -- cgit v1.2.3