| 1 |
# flags: --minimum-version=3.14 |
| 2 |
x = t"foo" |
| 3 |
x = t'foo {{ {2 + 2}bar {{ baz' |
| 4 |
|
| 5 |
x = t"foo {f'abc'} bar" |
| 6 |
|
| 7 |
x = t"""foo {{ a |
| 8 |
foo {2 + 2}bar {{ baz |
| 9 |
|
| 10 |
x = f"foo {{ { |
| 11 |
2 + 2 # comment |
| 12 |
}bar" |
| 13 |
|
| 14 |
{{ baz |
| 15 |
|
| 16 |
}} buzz |
| 17 |
|
| 18 |
{print("abc" + "def" |
| 19 |
)} |
| 20 |
abc""" |
| 21 |
|
| 22 |
t'{(abc:=10)}' |
| 23 |
|
| 24 |
t'''This is a really long string, but just make sure that you reflow tstrings { |
| 25 |
2+2:d |
| 26 |
}''' |
| 27 |
t'This is a really long string, but just make sure that you reflow tstrings correctly {2+2:d}' |
| 28 |
|
| 29 |
t"{ 2 + 2 = }" |
| 30 |
|
| 31 |
t'{ |
| 32 |
X |
| 33 |
!r |
| 34 |
}' |
| 35 |
|
| 36 |
tr'\{{\}}' |
| 37 |
|
| 38 |
t''' |
| 39 |
WITH {f''' |
| 40 |
{1}_cte AS ()'''} |
| 41 |
''' |
| 42 |
|
| 43 |
# output |
| 44 |
x = t"foo" |
| 45 |
x = t"foo {{ {2 + 2}bar {{ baz" |
| 46 |
|
| 47 |
x = t"foo {f'abc'} bar" |
| 48 |
|
| 49 |
x = t"""foo {{ a |
| 50 |
foo {2 + 2}bar {{ baz |
| 51 |
|
| 52 |
x = f"foo {{ { |
| 53 |
2 + 2 # comment |
| 54 |
}bar" |
| 55 |
|
| 56 |
{{ baz |
| 57 |
|
| 58 |
}} buzz |
| 59 |
|
| 60 |
{print("abc" + "def" |
| 61 |
)} |
| 62 |
abc""" |
| 63 |
|
| 64 |
t"{(abc:=10)}" |
| 65 |
|
| 66 |
t"""This is a really long string, but just make sure that you reflow tstrings { |
| 67 |
2+2:d |
| 68 |
}""" |
| 69 |
t"This is a really long string, but just make sure that you reflow tstrings correctly {2+2:d}" |
| 70 |
|
| 71 |
t"{ 2 + 2 = }" |
| 72 |
|
| 73 |
t"{ |
| 74 |
X |
| 75 |
!r |
| 76 |
}" |
| 77 |
|
| 78 |
rt"\{{\}}" |
| 79 |
|
| 80 |
t""" |
| 81 |
WITH {f''' |
| 82 |
{1}_cte AS ()'''} |
| 83 |
""" |