summaryrefslogtreecommitdiffstats
path: root/tests/format.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/format.test')
-rw-r--r--tests/format.test24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/format.test b/tests/format.test
index 541176e..7c383ee 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: format.test,v 1.13 2003/03/18 00:55:33 mdejong Exp $
+# RCS: @(#) $Id: format.test,v 1.14 2003/03/27 13:19:15 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -84,37 +84,37 @@ test format-2.5 {string formatting, embedded nulls} {
test format-2.6 {string formatting, international chars} {
format "%10s" abc\ufeffdef
} " abc\ufeffdef"
-test format-2.6 {string formatting, international chars} {
+test format-2.7 {string formatting, international chars} {
format "%.5s" abc\ufeffdef
} "abc\ufeffd"
-test format-2.7 {string formatting, international chars} {
+test format-2.8 {string formatting, international chars} {
format "foo\ufeffbar%s" baz
} "foo\ufeffbarbaz"
-test format-2.8 {string formatting, width} {
+test format-2.9 {string formatting, width} {
format "a%5sa" f
} "a fa"
-test format-2.9 {string formatting, width} {
+test format-2.10 {string formatting, width} {
format "a%-5sa" f
} "af a"
-test format-2.10 {string formatting, width} {
+test format-2.11 {string formatting, width} {
format "a%2sa" foo
} "afooa"
-test format-2.11 {string formatting, width} {
+test format-2.12 {string formatting, width} {
format "a%0sa" foo
} "afooa"
-test format-2.12 {string formatting, precision} {
+test format-2.13 {string formatting, precision} {
format "a%.2sa" foobarbaz
} "afoa"
-test format-2.13 {string formatting, precision} {
+test format-2.14 {string formatting, precision} {
format "a%.sa" foobarbaz
} "aa"
-test format-2.14 {string formatting, precision} {
+test format-2.15 {string formatting, precision} {
list [catch {format "a%.-2sa" foobarbaz} msg] $msg
} {1 {bad field specifier "-"}}
-test format-2.15 {string formatting, width and precision} {
+test format-2.16 {string formatting, width and precision} {
format "a%5.2sa" foobarbaz
} "a foa"
-test format-2.16 {string formatting, width and precision} {
+test format-2.17 {string formatting, width and precision} {
format "a%5.7sa" foobarbaz
} "afoobarba"