X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/544ea9c217cad9459d7b60665db787e94b52f93d..7b153936587e17b9db992a2d8c8b6cfba3ef7209:/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}\""