X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/544ea9c217cad9459d7b60665db787e94b52f93d..82e150a13ac78a1f24de27977d8a40883bc3d6e7:/tests/data/string_quotes.py 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}\""