diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-16 17:22:45 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-16 17:22:45 (GMT) |
commit | b0753631308a34f70c1b18918a04affe4c567ee5 (patch) | |
tree | 774d49569adaa9399414a5960c695a2f2e7a6b68 /tests | |
parent | 39c9ae29d9fb0b0f6935081aae95607f8d2de414 (diff) | |
download | tcl-b0753631308a34f70c1b18918a04affe4c567ee5.zip tcl-b0753631308a34f70c1b18918a04affe4c567ee5.tar.gz tcl-b0753631308a34f70c1b18918a04affe4c567ee5.tar.bz2 |
cleanup format.test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/format.test | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/tests/format.test b/tests/format.test index 43100bc..6944cc3 100644 --- a/tests/format.test +++ b/tests/format.test @@ -83,22 +83,13 @@ 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 { +test format-1.13 {integer formatting} { 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 { +test format-1.14 {integer formatting} { 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 { +test format-1.15 {integer formatting} { format "%-#5d %-#20d %-#20d %-#20d %-#20d" 0 6 34 16923 -12 -1 } {0 6 34 16923 -12 } @@ -119,14 +110,14 @@ test format-2.5 {string formatting, embedded nulls} { format "%10s" abc\0def } " abc\0def" test format-2.6 {string formatting, international chars} { - format "%10s" abc\ufeffdef -} " abc\ufeffdef" + format "%10s" abc\uFEFFdef +} " abc\uFEFFdef" test format-2.7 {string formatting, international chars} { - format "%.5s" abc\ufeffdef -} "abc\ufeffd" + format "%.5s" abc\uFEFFdef +} "abc\uFEFFd" test format-2.8 {string formatting, international chars} { - format "foo\ufeffbar%s" baz -} "foo\ufeffbarbaz" + format "foo\uFEFFbar%s" baz +} "foo\uFEFFbarbaz" test format-2.9 {string formatting, width} { format "a%5sa" f } "a fa" @@ -373,9 +364,9 @@ test format-8.19 {error conditions} { catch {format %q x} } 1 test format-8.20 {error conditions} { - catch {format %q x} msg + catch {format %r x} msg set msg -} {bad field specifier "q"} +} {bad field specifier "r"} test format-8.21 {error conditions} { catch {format %d} } 1 |