summaryrefslogtreecommitdiffstats
path: root/tests/format.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-22 08:59:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-22 08:59:59 (GMT)
commitf57dacd4955b9dd474cfd9d4e4d55cac22990f6c (patch)
tree4279a8d6d210513fd1d3eb0e359451c908bf39a3 /tests/format.test
parent3fbd7a5d26765959a123fa57ddd20a7587038d9b (diff)
parent4c7792803aef1af6855d09024b037dc190bc249f (diff)
downloadtcl-f57dacd4955b9dd474cfd9d4e4d55cac22990f6c.zip
tcl-f57dacd4955b9dd474cfd9d4e4d55cac22990f6c.tar.gz
tcl-f57dacd4955b9dd474cfd9d4e4d55cac22990f6c.tar.bz2
merge core-8-6-branch
Diffstat (limited to 'tests/format.test')
-rw-r--r--tests/format.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/format.test b/tests/format.test
index 722ad21..7fa6a72 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -79,6 +79,25 @@ 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} longIs32bit {
+ format "%#d %#d %#d %#d %#d" 0 6 34 16923 -12 -1
+} {0 6 34 16923 -12}
+test format-1.13.1 {integer formatting} longIs64bit {
+ format "%#d %#d %#d %#d %#d" 0 6 34 16923 -12 -1
+} {0 6 34 16923 -12}
+test format-1.14 {integer formatting} longIs32bit {
+ format "%#5d %#20d %#20d %#20d %#20d" 0 6 34 16923 -12 -1
+} { 0 6 34 16923 -12}
+test format-1.14.1 {integer formatting} longIs64bit {
+ format "%#5d %#20d %#20d %#20d %#20d" 0 6 34 16923 -12 -1
+} { 0 6 34 16923 -12}
+test format-1.15 {integer formatting} longIs32bit {
+ format "%-#5d %-#20d %-#20d %-#20d %-#20d" 0 6 34 16923 -12 -1
+} {0 6 34 16923 -12 }
+test format-1.15.1 {integer formatting} longIs64bit {
+ format "%-#5d %-#20d %-#20d %-#20d %-#20d" 0 6 34 16923 -12 -1
+} {0 6 34 16923 -12 }
+
test format-2.1 {string formatting} {
format "%s %s %c %s" abcd {This is a very long test string.} 120 x