summaryrefslogtreecommitdiffstats
path: root/tests/expr-old.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-04-18 13:04:20 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-04-18 13:04:20 (GMT)
commit4da52701cd2676916c17d74b8c698025a9b3aebd (patch)
tree2e156e3c84fa1b82458e15f57f3027533a9eb34e /tests/expr-old.test
parent342091a852b8bbb1cf9351963ac23d540938fc5e (diff)
downloadtcl-4da52701cd2676916c17d74b8c698025a9b3aebd.zip
tcl-4da52701cd2676916c17d74b8c698025a9b3aebd.tar.gz
tcl-4da52701cd2676916c17d74b8c698025a9b3aebd.tar.bz2
fix for [Bug #542588], where "too large integers" were reported as
"floating-point value" in [expr] error messages.
Diffstat (limited to 'tests/expr-old.test')
-rw-r--r--tests/expr-old.test9
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."