summaryrefslogtreecommitdiffstats
path: root/tests/expr-old.test
diff options
context:
space:
mode:
authorstanton <stanton>1998-09-21 23:39:52 (GMT)
committerstanton <stanton>1998-09-21 23:39:52 (GMT)
commit494c2de3a748b449c69ce322a1a741f5a31fd4d5 (patch)
treec3ece48c0ae3f4ba54787e0e8e729b65752ef3f9 /tests/expr-old.test
parent7a698c0488d99c0af42022714638ae1ba2afaa49 (diff)
downloadtcl-494c2de3a748b449c69ce322a1a741f5a31fd4d5.zip
tcl-494c2de3a748b449c69ce322a1a741f5a31fd4d5.tar.gz
tcl-494c2de3a748b449c69ce322a1a741f5a31fd4d5.tar.bz2
Added contents of Tcl 8.1a2
Diffstat (limited to 'tests/expr-old.test')
-rw-r--r--tests/expr-old.test24
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test
index 8fb8ad9..98251be 100644
--- a/tests/expr-old.test
+++ b/tests/expr-old.test
@@ -2,9 +2,9 @@
#
# This file contains the original set of tests for Tcl's expr command.
# Since the expr command is now compiled, a new set of tests covering
-# the new implementation is in the file "expr.test". Sourcing this file
-# into Tcl runs the tests and generates output for errors.
-# No output means no errors were found.
+# the new implementation are in the files "parseExpr.test and
+# "compExpr.test". Sourcing this file into Tcl runs the tests and generates
+# output for errors. No output means no errors were found.
#
# Copyright (c) 1991-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -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.
#
-# SCCS: @(#) expr-old.test 1.63 97/10/31 17:23:24
+# SCCS: @(#) expr-old.test 1.68 97/12/16 13:32:24
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -402,7 +402,7 @@ test expr-old-25.15 {type conversions} {expr {24.1 > "24.1a"}} 0
test expr-old-25.16 {type conversions} {expr 2+2.5} 4.5
test expr-old-25.17 {type conversions} {expr 2+2.5} 4.5
test expr-old-25.18 {type conversions} {expr 2.0e2} 200.0
-test expr-old-25.19 {type conversions} {expr 2.0e15} 2e+15
+test expr-old-25.19 {type conversions} {eformat} {expr 2.0e15} 2e+15
test expr-old-25.20 {type conversions} {expr 10.0} 10.0
# Various error conditions.
@@ -456,13 +456,13 @@ test expr-old-26.15 {error conditions} {
} {1 {syntax error in expression "a@b"}}
test expr-old-26.16 {error conditions} {
list [catch {expr a[b} msg] $msg
-} {1 {missing close-bracket or close-brace}}
+} {1 {missing close-bracket}}
test expr-old-26.17 {error conditions} {
list [catch {expr a`b} msg] $msg
} {1 {syntax error in expression "a`b"}}
test expr-old-26.18 {error conditions} {
list [catch {expr \"a\"\{b} msg] $msg
-} {1 {missing close-brace}}
+} {1 syntax\ error\ in\ expression\ \"\"a\"\{b\"}
test expr-old-26.19 {error conditions} {
list [catch {expr a} msg] $msg
} {1 {syntax error in expression "a"}}
@@ -777,10 +777,10 @@ test expr-old-32.45 {math functions in expressions} {
} {1}
test expr-old-32.46 {math functions in expressions} {
list [catch {expr rand(24)} msg] $msg
-} {1 {syntax error in expression "rand(24)"}}
+} {1 {too many arguments for math function}}
test expr-old-32.47 {math functions in expressions} {
list [catch {expr srand()} msg] $msg
-} {1 {syntax error in expression "srand()"}}
+} {1 {too few arguments for math function}}
test expr-old-32.48 {math functions in expressions} {
list [catch {expr srand(3.79)} msg] $msg
} {1 {can't use floating-point value as argument to srand}}
@@ -862,7 +862,7 @@ test expr-old-34.16 {errors in math functions} {
if $gotT1 {
test expr-old-34.17 {errors in math functions} {
list [catch {expr T1(4)} msg] $msg
- } {1 {syntax error in expression "T1(4)"}}
+ } {1 {too many arguments for math function}}
}
test expr-old-36.1 {ExprLooksLikeInt procedure} {
@@ -871,7 +871,7 @@ test expr-old-36.1 {ExprLooksLikeInt procedure} {
test expr-old-36.2 {ExprLooksLikeInt procedure} {
set x 0289
list [catch {expr {$x+1}} msg] $msg
-} {1 {can't use non-numeric string as operand of "+"}}
+} {1 {can't use floating-point value as operand of "+"}}
test expr-old-36.3 {ExprLooksLikeInt procedure} {
list [catch {expr 0289.1} msg] $msg
} {0 289.1}
@@ -918,3 +918,5 @@ if {(4195835.0 - (4195835.0/3145727.0)*3145727.0) == 256.0} {
puts "call Intel customer service immediately at 1-800-628-8686"
puts "to request a replacement processor."
}
+
+return