summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string_format.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/string_format.py')
-rw-r--r--tests/basics/string_format.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/basics/string_format.py b/tests/basics/string_format.py
index 07071be5ab..5398c6e236 100644
--- a/tests/basics/string_format.py
+++ b/tests/basics/string_format.py
@@ -6,6 +6,7 @@ full_tests = False
def test(fmt, *args):
print('{:8s}'.format(fmt) + '>' + fmt.format(*args) + '<')
+test("}}{{")
test("{}-{}", 1, [4, 5])
test("{0}-{1}", 1, [4, 5])
test("{1}-{0}", 1, [4, 5])
@@ -40,6 +41,7 @@ test("{:#4X}", 0)
test("{:<6s}", "ab")
test("{:>6s}", "ab")
test("{:^6s}", "ab")
+test("{:.1s}", "ab")
test("{: <6d}", 123)
test("{: <6d}", -123)