summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/format.test14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/format.test b/tests/format.test
index 448f162..02af0d3 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.11.2.7 2005/06/17 23:26:20 dkf Exp $
+# RCS: @(#) $Id: format.test,v 1.11.2.8 2005/10/13 21:45:32 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -369,6 +369,10 @@ test format-10.4 {"h" format specifier} {
# Bug 1154163: This is minimal behaviour for %hx specifier!
format %hx 1
} 1
+test format-10.5 {"h" format specifier} {
+ # Bug 1284178: Highly out-of-range values shouldn't cause errors
+ format %hu 0x100000000
+} 0
test format-11.1 {XPG3 %$n specifiers} {
format {%2$d %1$d} 4 5
@@ -497,8 +501,8 @@ for {set i 290} {$i < 400} {incr i} {
[expr {wide(0x80000000) != int(0x80000000)}]
test format-17.1 {testing %d with wide} {64bitInts wideIntExpressions} {
- list [catch {format %d 7810179016327718216} msg] $msg
-} {1 {integer value too large to represent}}
+ format %d 7810179016327718216
+} 1819043144
test format-17.2 {testing %ld with wide} {64bitInts} {
format %ld 7810179016327718216
} 7810179016327718216
@@ -536,8 +540,8 @@ test format-18.1 {do not demote existing numeric values} {
test format-18.2 {do not demote existing numeric values} {wideIntExpressions} {
set a [expr {0xaaaaaaaaaa + 1}]
set b 0xaaaaaaaaab
- list [catch {format %08x $a} msg] $msg [expr {$a == $b}]
-} {1 {integer value too large to represent} 1}
+ list [format %08x $a] [expr {$a == $b}]
+} {aaaaaaab 1}
test format-19.1 {
regression test - tcl-core message by Brian Griffin on