diff options
author | Tom Collins <tom.collins@digi.com> | 2017-05-09 13:17:04 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-05-12 15:14:25 +1000 |
commit | 760aa0996f29ae33a36c48128dd8f74597b877ad (patch) | |
tree | 563de817266090835547d7dea0e0ebbe45313c9c /tests/basics/lexer.py | |
parent | 6f56412ec3b93bb93b109f0a01512ecaeebf4f79 (diff) |
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.
Diffstat (limited to 'tests/basics/lexer.py')
-rw-r--r-- | tests/basics/lexer.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/basics/lexer.py b/tests/basics/lexer.py index f1602f5de..244de8cb9 100644 --- a/tests/basics/lexer.py +++ b/tests/basics/lexer.py @@ -27,6 +27,14 @@ print(eval("1\r")) print(eval("12\r")) print(eval("123\r")) +# line continuation +print(eval("'123' \\\r '456'")) +print(eval("'123' \\\n '456'")) +print(eval("'123' \\\r\n '456'")) +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 print('a\ b') |