summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-11 20:50:45 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-11 20:50:45 (GMT)
commit1e3d8de94601b1efb0a694e0f756a0beeeded462 (patch)
tree262c9158ed0ab2883ffc3d0c5a9cbc70da00545c /tests
parent092f06de8fa11aaa44b5d6d0a127ca0d0f87703d (diff)
downloadtcl-1e3d8de94601b1efb0a694e0f756a0beeeded462.zip
tcl-1e3d8de94601b1efb0a694e0f756a0beeeded462.tar.gz
tcl-1e3d8de94601b1efb0a694e0f756a0beeeded462.tar.bz2
* generic/tclCmdMZ.c (Tcl_StringObjCmd,STR_IS_INT): Corrected
inconsistent results of [string is integer] observed on systems where sizeof(long) != sizeof(int). [Bug 718878] * tests/string.test: Added tests for Bug 718878. * doc/string.n: Clarified that [string is integer] accepts 32-bit integers.
Diffstat (limited to 'tests')
-rw-r--r--tests/string.test18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test
index ae84010..89ece02 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: string.test,v 1.36 2003/02/18 02:25:45 hobbs Exp $
+# RCS: @(#) $Id: string.test,v 1.37 2003/04/11 20:50:47 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -591,6 +591,22 @@ test string-6.91 {string is double, bad doubles} {
}
set result
} {1 1 0 0 0 1 0 0}
+test string-6.92 {string is double, 32-bit overflow} {
+ # Bug 718878
+ set x 0x100000000
+ list [string is integer -failindex var $x] $var
+} {0 -1}
+test string-6.93 {string is double, 32-bit overflow} {
+ # Bug 718878
+ set x 0x100000000
+ append x ""
+ list [string is integer -failindex var $x] $var
+} {0 -1}
+test string-6.94 {string is double, 32-bit overflow} {
+ # Bug 718878
+ set x 0x100000000
+ list [string is integer -failindex var [expr {$x}]] $var
+} {0 -1}
catch {rename largest_int {}}