Add more tests for fancy whitespace (#2147)
This commit is contained in:
parent
557b54aa60
commit
eaa337f176
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
- Fix crash on docstrings ending with "\ ". (#2142)
|
- Fix crash on docstrings ending with "\ ". (#2142)
|
||||||
|
|
||||||
|
- Fix crash when atypical whitespace is cleaned out of dostrings (#2120)
|
||||||
|
|
||||||
- Reflect the `--skip-magic-trailing-comma` and `--experimental-string-processing` flags
|
- Reflect the `--skip-magic-trailing-comma` and `--experimental-string-processing` flags
|
||||||
in the name of the cache file. Without this fix, changes in these flags would not take
|
in the name of the cache file. Without this fix, changes in these flags would not take
|
||||||
effect if the cache had already been populated. (#2131)
|
effect if the cache had already been populated. (#2131)
|
||||||
|
@ -174,6 +174,20 @@ def multiline_backslash_2():
|
|||||||
hey there \ '''
|
hey there \ '''
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_3():
|
||||||
|
'''
|
||||||
|
already escaped \\ '''
|
||||||
|
|
||||||
|
|
||||||
|
def my_god_its_full_of_stars_1():
|
||||||
|
"I'm sorry Dave\u2001"
|
||||||
|
|
||||||
|
|
||||||
|
# the space below is actually a \u2001, removed in output
|
||||||
|
def my_god_its_full_of_stars_2():
|
||||||
|
"I'm sorry Dave "
|
||||||
|
|
||||||
|
|
||||||
# output
|
# output
|
||||||
|
|
||||||
class MyClass:
|
class MyClass:
|
||||||
@ -347,3 +361,17 @@ def multiline_backslash_1():
|
|||||||
def multiline_backslash_2():
|
def multiline_backslash_2():
|
||||||
"""
|
"""
|
||||||
hey there \ """
|
hey there \ """
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_3():
|
||||||
|
"""
|
||||||
|
already escaped \\"""
|
||||||
|
|
||||||
|
|
||||||
|
def my_god_its_full_of_stars_1():
|
||||||
|
"I'm sorry Dave\u2001"
|
||||||
|
|
||||||
|
|
||||||
|
# the space below is actually a \u2001, removed in output
|
||||||
|
def my_god_its_full_of_stars_2():
|
||||||
|
"I'm sorry Dave"
|
@ -102,6 +102,26 @@ def shockingly_the_quotes_are_normalized_v2():
|
|||||||
'''
|
'''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def backslash_space():
|
||||||
|
'\ '
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_1():
|
||||||
|
'''
|
||||||
|
hey\there\
|
||||||
|
\ '''
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_2():
|
||||||
|
'''
|
||||||
|
hey there \ '''
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_3():
|
||||||
|
'''
|
||||||
|
already escaped \\ '''
|
||||||
|
|
||||||
# output
|
# output
|
||||||
|
|
||||||
class ALonelyClass:
|
class ALonelyClass:
|
||||||
@ -207,3 +227,23 @@ def shockingly_the_quotes_are_normalized_v2():
|
|||||||
Docstring Docstring Docstring
|
Docstring Docstring Docstring
|
||||||
'''
|
'''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def backslash_space():
|
||||||
|
'\ '
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_1():
|
||||||
|
'''
|
||||||
|
hey\there\
|
||||||
|
\ '''
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_2():
|
||||||
|
'''
|
||||||
|
hey there \ '''
|
||||||
|
|
||||||
|
|
||||||
|
def multiline_backslash_3():
|
||||||
|
'''
|
||||||
|
already escaped \\'''
|
||||||
|
Loading…
Reference in New Issue
Block a user