X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/104aec555fae0883ef5b53709569bd9c4d420bc5..8c04847aa22d14f01bb206cfc1b1e1cebd2ae538:/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}\""