mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-105017: Fix including additional NL token when using CRLF (#105022)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
6e62eb2e70
commit
86d8f48935
3 changed files with 10 additions and 1 deletions
|
@ -84,6 +84,14 @@ class TokenizeTest(TestCase):
|
|||
NEWLINE '\\n' (4, 26) (4, 27)
|
||||
DEDENT '' (5, 0) (5, 0)
|
||||
""")
|
||||
|
||||
self.check_tokenize("foo='bar'\r\n", """\
|
||||
NAME 'foo' (1, 0) (1, 3)
|
||||
OP '=' (1, 3) (1, 4)
|
||||
STRING "'bar'" (1, 4) (1, 9)
|
||||
NEWLINE '\\n' (1, 9) (1, 10)
|
||||
""")
|
||||
|
||||
indent_error_file = b"""\
|
||||
def k(x):
|
||||
x += 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue