mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
bpo-25643: Refactor the C tokenizer into smaller, logical units (GH-25050)
This commit is contained in:
parent
fb1d01b963
commit
261a452a13
4 changed files with 354 additions and 360 deletions
|
@ -205,6 +205,23 @@ class AbstractSourceEncodingTest:
|
|||
b'print(ascii("\xc3\xa4"))\n')
|
||||
self.check_script_output(src, br"'\xe4'")
|
||||
|
||||
def test_crlf(self):
|
||||
src = (b'print(ascii("""\r\n"""))\n')
|
||||
out = self.check_script_output(src, br"'\n'")
|
||||
|
||||
def test_crcrlf(self):
|
||||
src = (b'print(ascii("""\r\r\n"""))\n')
|
||||
out = self.check_script_output(src, br"'\n\n'")
|
||||
|
||||
def test_crcrcrlf(self):
|
||||
src = (b'print(ascii("""\r\r\r\n"""))\n')
|
||||
out = self.check_script_output(src, br"'\n\n\n'")
|
||||
|
||||
def test_crcrcrlf2(self):
|
||||
src = (b'#coding:iso-8859-1\n'
|
||||
b'print(ascii("""\r\r\r\n"""))\n')
|
||||
out = self.check_script_output(src, br"'\n\n\n'")
|
||||
|
||||
|
||||
class BytesSourceEncodingTest(AbstractSourceEncodingTest, unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue