summaryrefslogtreecommitdiffstats
path: root/tests/scan.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-02-15 14:28:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-02-15 14:28:47 (GMT)
commit66a15c6f8be47c3acbdddffadc67f50dec8a56e6 (patch)
treeedaf81ee6d40edeacc9f3e2093ddcb2ba302c620 /tests/scan.test
parent2827a2692798a7a0ec46e684a4ccc83afb39859e (diff)
downloadtcl-66a15c6f8be47c3acbdddffadc67f50dec8a56e6.zip
tcl-66a15c6f8be47c3acbdddffadc67f50dec8a56e6.tar.gz
tcl-66a15c6f8be47c3acbdddffadc67f50dec8a56e6.tar.bz2
TIP#72 implementation. See ChangeLog for details.
This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode.
Diffstat (limited to 'tests/scan.test')
-rw-r--r--tests/scan.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/scan.test b/tests/scan.test
index d3d8c96..2bfa49a 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -11,13 +11,16 @@
# 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.12 2002/02/07 01:50:46 hobbs Exp $
+# RCS: @(#) $Id: scan.test,v 1.13 2002/02/15 14:28:50 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
+set ::tcltest::testConstraints(64bitInts) \
+ [expr {0x80000000 > 0}]
+
test scan-1.1 {BuildCharSet, CharInSet} {
list [scan foo {%[^o]} x] $x
} {1 f}
@@ -416,6 +419,12 @@ test scan-5.11 {integer scanning} {nonPortable} {
[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-6.1 {floating-point scanning} {
set a {}; set b {}; set c {}; set d {}
list [scan "2.1 -3.0e8 .99962 a" "%f%g%e%f" a b c d] $a $b $c $d