X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/544ea9c217cad9459d7b60665db787e94b52f93d..def048356bb31474c3316f758503742773265bbf:/tests/data/string_quotes.py?ds=sidebyside diff --git a/tests/data/string_quotes.py b/tests/data/string_quotes.py index 5a4bc5d..3384241 100644 --- a/tests/data/string_quotes.py +++ b/tests/data/string_quotes.py @@ -51,6 +51,11 @@ f'{y * x} \'{z}\'' '\'{z}\' {y * " "}' '{y * x} \'{z}\'' +# We must bail out if changing the quotes would introduce backslashes in f-string +# expressions. xref: https://github.com/psf/black/issues/2348 +f"\"{b}\"{' ' * (long-len(b)+1)}: \"{sts}\",\n" +f"\"{a}\"{'hello' * b}\"{c}\"" + # output """""" @@ -100,3 +105,8 @@ f'\'{z}\' {y * " "}' f"{y * x} '{z}'" "'{z}' {y * \" \"}" "{y * x} '{z}'" + +# We must bail out if changing the quotes would introduce backslashes in f-string +# expressions. xref: https://github.com/psf/black/issues/2348 +f"\"{b}\"{' ' * (long-len(b)+1)}: \"{sts}\",\n" +f"\"{a}\"{'hello' * b}\"{c}\""