X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f71db23824a25300618dd0625085ade8d2b3a7a8..93701d249e2cadf0ec096a752a5cbbe8da1a1130:/tests/data/fstring.py diff --git a/tests/data/fstring.py b/tests/data/fstring.py index b288cbc..4b33231 100644 --- a/tests/data/fstring.py +++ b/tests/data/fstring.py @@ -1,5 +1,21 @@ f"f-string without formatted values is just a string" f"{{NOT a formatted value}}" +f"{{NOT 'a' \"formatted\" \"value\"}}" f"some f-string with {a} {few():.2f} {formatted.values!r}" -f"{f'{nested} inner'} outer" +f'some f-string with {a} {few(""):.2f} {formatted.values!r}' +f"{f'''{'nested'} inner'''} outer" +f"\"{f'{nested} inner'}\" outer" f"space between opening braces: { {a for a in (1, 2, 3)}}" +f'Hello \'{tricky + "example"}\'' + +# output + +f"f-string without formatted values is just a string" +f"{{NOT a formatted value}}" +f'{{NOT \'a\' "formatted" "value"}}' +f"some f-string with {a} {few():.2f} {formatted.values!r}" +f'some f-string with {a} {few(""):.2f} {formatted.values!r}' +f"{f'''{'nested'} inner'''} outer" +f"\"{f'{nested} inner'}\" outer" +f"space between opening braces: { {a for a in (1, 2, 3)}}" +f'Hello \'{tricky + "example"}\''