X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f71db23824a25300618dd0625085ade8d2b3a7a8..3d96b7f10a56fcf826693e98f08b673dad8ac256:/tests/data/fstring.py?ds=sidebyside 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"}\''