diff options
author | dgp <dgp@users.sourceforge.net> | 2017-09-05 12:28:41 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-09-05 12:28:41 (GMT) |
commit | 018892450cdacc7e4660a4cc138a51e1143a2b12 (patch) | |
tree | bc8d5053c422ca180b237864f9522bb64c885cf9 /tests/format.test | |
parent | d23fe52664cbef62956cc8ba4e689b9873992b0c (diff) | |
parent | edb7af10d93df44cc25e9dce384c61669ce73dc8 (diff) | |
download | tcl-tip_282.zip tcl-tip_282.tar.gz tcl-tip_282.tar.bz2 |
merge trunktip_282
Diffstat (limited to 'tests/format.test')
-rw-r--r-- | tests/format.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/format.test b/tests/format.test index 722ad21..094b7b3 100644 --- a/tests/format.test +++ b/tests/format.test @@ -79,6 +79,16 @@ test format-1.11.1 {integer formatting} longIs64bit { test format-1.12 {integer formatting} { format "%b %#b %#b %llb" 5 0 5 [expr {2**100}] } {101 0b0 0b101 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000} +test format-1.13 {integer formatting} { + format "%#d %#d %#d %#d %#d" 0 6 34 16923 -12 -1 +} {0d0 0d6 0d34 0d16923 -0d12} +test format-1.14 {integer formatting} { + format "%#5d %#20d %#20d %#20d %#20d" 0 6 34 16923 -12 -1 +} { 0d0 0d6 0d34 0d16923 -0d12} +test format-1.15 {integer formatting} { + format "%-#5d %-#20d %-#20d %-#20d %-#20d" 0 6 34 16923 -12 -1 +} {0d0 0d6 0d34 0d16923 -0d12 } + test format-2.1 {string formatting} { format "%s %s %c %s" abcd {This is a very long test string.} 120 x |