summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string-format.py
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2014-04-07 11:19:51 -0700
committerDave Hylands <dhylands@gmail.com>2014-04-07 11:38:45 -0700
commitc4029e5079126585e4616f1d511d94318e1f1700 (patch)
treeaec6bf2e02566892ad3f4e21bb33c3dcf3fcf7b5 /tests/basics/string-format.py
parent6827f9fc55e748a069a44f4e3681c26518e1dbca (diff)
downloadmicropython-c4029e5079126585e4616f1d511d94318e1f1700.tar.gz
micropython-c4029e5079126585e4616f1d511d94318e1f1700.zip
Add string formatting support for longlong and mpz.
Diffstat (limited to 'tests/basics/string-format.py')
-rw-r--r--tests/basics/string-format.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/basics/string-format.py b/tests/basics/string-format.py
index 8049c6f73b..2d6d0cc721 100644
--- a/tests/basics/string-format.py
+++ b/tests/basics/string-format.py
@@ -24,11 +24,19 @@ test("{:4o}", 123)
test("{:4x}", 123)
test("{:4X}", 123)
+test("{:4,d}", 12345678)
+
test("{:#4b}", 10)
test("{:#4o}", 123)
test("{:#4x}", 123)
test("{:#4X}", 123)
+test("{:#4d}", 0)
+test("{:#4b}", 0)
+test("{:#4o}", 0)
+test("{:#4x}", 0)
+test("{:#4X}", 0)
+
test("{:<6s}", "ab")
test("{:>6s}", "ab")
test("{:^6s}", "ab")