diff options
| author | Damien George <damien.p.george@gmail.com> | 2014-04-04 12:37:52 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-04-04 12:37:52 +0100 |
| commit | 9b1599c66399737496f7f4deaf495ad2dafdc0a1 (patch) | |
| tree | 65972f877e42949a5a8c0afee5c1610974177433 /tests/basics/string-format-modulo.py | |
| parent | af27259439b6a48ef2d71cc94ca8d3004ac54d62 (diff) | |
| parent | 6756a37a77b64b804ee681a22935e0077226eb63 (diff) | |
Merge pull request #422 from dhylands/str-modulo
Str modulo
Diffstat (limited to 'tests/basics/string-format-modulo.py')
| -rw-r--r-- | tests/basics/string-format-modulo.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/basics/string-format-modulo.py b/tests/basics/string-format-modulo.py index 0b50c2674..82cbdddc7 100644 --- a/tests/basics/string-format-modulo.py +++ b/tests/basics/string-format-modulo.py @@ -20,3 +20,25 @@ try: print("=%s=" % (1, 2)) except TypeError: print("TypeError") + +print("%c" % 48) +print("%c" % 'a') +print("%10s" % 'abc') +print("%-10s" % 'abc') +print("%d" % 10) +print("%+d" % 10) +print("% d" % 10) +print("%d" % -10) +print("%x" % 18) +print("%o" % 18) +print("%X" % 18) +print("%#x" % 18) +print("%#X" % 18) +print("%#6x" % 18) +print("%#06x" % 18) +print("%e" % 1.23456) +print("%E" % 1.23456) +print("%f" % 1.23456) +print("%F" % 1.23456) +print("%g" % 1.23456) +print("%G" % 1.23456) |
