From 4c4dbba0fe0d26097c20ac8bc74b873c7adbb28c Mon Sep 17 00:00:00 2001
From: dkf <donal.k.fellows@manchester.ac.uk>
Date: Thu, 13 Oct 2005 21:49:46 +0000
Subject: Test updates from [Bug 1284178]

---
 ChangeLog         |  5 +++++
 tests/format.test | 14 +++++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4f1dc13..3518644 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-13  Donal K. Fellows  <donal.k.fellows@man.ac.uk>
+
+	* tests/format.test: "Forward"-port of test updates relating to
+	[Bug 1284178]. The bug itself was fixed by TIP#237.
+
 2005-10-13  Zoran Vasiljevic <vasiljevic@users.sourceforge.net>
 
 	* generic/tclIO.c (Tcl_ClearChannelHandlers): temporary
diff --git a/tests/format.test b/tests/format.test
index 86f4665..f99861d 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.22 2005/10/08 14:42:54 dgp Exp $
+# RCS: @(#) $Id: format.test,v 1.23 2005/10/13 21:49:46 dkf Exp $
 
 if {[lsearch [namespace children] ::tcltest] == -1} {
     package require tcltest 2
@@ -381,6 +381,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
@@ -509,8 +513,8 @@ for {set i 290} {$i < 400} {incr i} {
 	[expr {wide(0x80000000) != int(0x80000000)}]
 
 test format-17.1 {testing %d with wide} {wideIs64bit wideBiggerThanInt} {
-    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} {wideIs64bit} {
     format %ld 7810179016327718216
 } 7810179016327718216
@@ -541,8 +545,8 @@ test format-18.1 {do not demote existing numeric values} {
 test format-18.2 {do not demote existing numeric values} {wideBiggerThanInt} {
     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
-- 
cgit v0.12