mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-01 07:23:46 +08:00
Fix split lines for Python code
Some characters like Vertical Tab or File Separator were used as line separators. This is not legal. Line Separators in Python are only Carriage Return \r and Line Feed \n.
This commit is contained in:
1 parent
f4696a6245
commit
b1f613fe16
3 files changed
+34
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from textwrap import dedent
|
||||
import logging
|
||||
|
||||
@@ -952,3 +953,9 @@ def test_wrong_backslash(differ):
|
||||
differ.initialize(code1)
|
||||
differ.parse(code2, parsers=2, copies=2, expect_error_leaves=True)
|
||||
differ.parse(code1, parsers=1, copies=1)
|
||||
|
||||
|
||||
def test_random_unicode_characters(differ):
|
||||
differ.initialize('')
|
||||
differ.parse('\x1dĔBϞɛˁşʑ˳˻ȣſéÎ\x90̕ȟòwʘ\x1dĔBϞɛˁşʑ˳˻ȣſéÎ', parsers=1, expect_error_leaves=True)
|
||||
differ.parse('')
|
||||
Reference in new issue
Block a user