summaryrefslogtreecommitdiffstats
path: root/tests/scan.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-08-19 20:58:59 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-08-19 20:58:59 (GMT)
commit2eb24794969d407846d80bce8ca07c486fb4ab0b (patch)
tree2d82ec9d0255996bf2683f03bceeebbeb36a320f /tests/scan.test
parentaedff4653c66d0c490a35ac117de3e4bee784f4f (diff)
downloadtcl-2eb24794969d407846d80bce8ca07c486fb4ab0b.zip
tcl-2eb24794969d407846d80bce8ca07c486fb4ab0b.tar.gz
tcl-2eb24794969d407846d80bce8ca07c486fb4ab0b.tar.bz2
Ensure that the %ld conversion works correctly on 64-bit platforms. [Bug 1011860]
Diffstat (limited to 'tests/scan.test')
-rw-r--r--tests/scan.test7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/scan.test b/tests/scan.test
index a86c3da..94ff998 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: scan.test,v 1.14 2002/06/22 04:19:47 dgp Exp $
+# RCS: @(#) $Id: scan.test,v 1.15 2004/08/19 20:59:00 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -417,12 +417,15 @@ test scan-5.11 {integer scanning} {nonPortable} {
list [scan "4294967280 4294967280" "%u %d" a b] $a \
[expr {$b == -16 || $b == 0x7fffffff}]
} {2 4294967280 1}
-
test scan-5.12 {integer scanning} {64bitInts} {
set a {}; set b {}; set c {}
list [scan "7810179016327718216,6c63546f6c6c6548,661432506755433062510" \
%ld,%lx,%lo a b c] $a $b $c
} {3 7810179016327718216 7810179016327718216 7810179016327718216}
+test scan-5.13 {integer scanning and overflow} {
+ # This test used to fail on some 64-bit systems. [Bug 1011860]
+ scan {300000000 3000000000 30000000000} {%ld %ld %ld}
+} {300000000 3000000000 30000000000}
test scan-6.1 {floating-point scanning} {
set a {}; set b {}; set c {}; set d {}