diff options
author | dgp <dgp@users.sourceforge.net> | 2003-04-11 20:49:50 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2003-04-11 20:49:50 (GMT) |
commit | 89bedb2bd8686d279dcdb5198d9938e5c9b45142 (patch) | |
tree | 7db1303db34093aa5b7a152871db2616ecae2794 /tests/string.test | |
parent | 83128c4f1e57926f3d3568d84a99b2d768cc529a (diff) | |
download | tcl-89bedb2bd8686d279dcdb5198d9938e5c9b45142.zip tcl-89bedb2bd8686d279dcdb5198d9938e5c9b45142.tar.gz tcl-89bedb2bd8686d279dcdb5198d9938e5c9b45142.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.test | 18 |
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 {}} |