summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-11 20:49:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-11 20:49:50 (GMT)
commit47554fcd67f382566a72813c4b11bda27ecfb201 (patch)
tree7db1303db34093aa5b7a152871db2616ecae2794 /tests/string.test
parent89975c594f663fa730e70a1d45ba4e4aedb9aed8 (diff)
downloadtcl-47554fcd67f382566a72813c4b11bda27ecfb201.zip
tcl-47554fcd67f382566a72813c4b11bda27ecfb201.tar.gz
tcl-47554fcd67f382566a72813c4b11bda27ecfb201.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/string.test')
-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..f1ba56d 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.36.2.1 2003/04/11 20:49:54 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 {}}