diff options
author | msofer <msofer@noemail.net> | 2002-04-18 13:04:19 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2002-04-18 13:04:19 (GMT) |
commit | f6b1471f6284a9f77c900c185737d399e614b935 (patch) | |
tree | 2e156e3c84fa1b82458e15f57f3027533a9eb34e /tests/expr-old.test | |
parent | 13841770593b7e100c8544403acd1eb9efa66cf6 (diff) | |
download | tcl-f6b1471f6284a9f77c900c185737d399e614b935.zip tcl-f6b1471f6284a9f77c900c185737d399e614b935.tar.gz tcl-f6b1471f6284a9f77c900c185737d399e614b935.tar.bz2 |
fix for [Bug #542588], where "too large integers" were reported as
"floating-point value" in [expr] error messages.
FossilOrigin-Name: ccca4d59862e1f73d0eb951b084ae69e25e57d03
Diffstat (limited to 'tests/expr-old.test')
-rw-r--r-- | tests/expr-old.test | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test index 6ed4446..3cf9959 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr-old.test,v 1.13 2001/12/06 10:59:17 dkf Exp $ +# RCS: @(#) $Id: expr-old.test,v 1.14 2002/04/18 13:04:20 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -934,6 +934,13 @@ test expr-old-36.10 {ExprLooksLikeInt procedure} {nonPortable unixOnly} { list [catch {expr 78e} msg] $msg } {1 {syntax error in expression "78e"}} +# test for [Bug #542588] +test expr-old-36.11 {ExprLooksLikeInt procedure} { + # define a "too large integer"; this one works also for 64bit arith + set x 665802003400000000000000 + list [catch {expr {$x+1}} msg] $msg +} {1 {can't use integer value too large to represent as operand of "+"}} + if {[info commands testexprlong] == {}} { puts "This application hasn't been compiled with the \"testexprlong\"" puts "command, so I can't test Tcl_ExprLong etc." |