X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f71db23824a25300618dd0625085ade8d2b3a7a8..24323091c81b8e166d73748d4caee8f7b4d954fb:/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"}\''