Commit 760aa099 authored by Tom Collins's avatar Tom Collins Committed by Damien George
Browse files

tests/basics/lexer: Add line continuation tests for lexer.

Tests for an issue with line continuation failing in paste mode due to the
lexer only checking for \n in the "following" character position, before
next_char() has had a chance to convert \r and \r\n to \n.
parent 6f56412e
...@@ -27,6 +27,14 @@ print(eval("1\r")) ...@@ -27,6 +27,14 @@ print(eval("1\r"))
print(eval("12\r")) print(eval("12\r"))
print(eval("123\r")) print(eval("123\r"))
# line continuation
print(eval("'123' \\\r '456'"))
print(eval("'123' \\\n '456'"))
print(eval("'123' \\\r\n '456'"))
# backslash used to escape a line-break in a string # backslash used to escape a line-break in a string
print('a\ print('a\
b') b')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment