summaryrefslogtreecommitdiffstats
path: root/tests/expr.test
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-08-19 03:00:12 (GMT)
committerhobbs <hobbs>1999-08-19 03:00:12 (GMT)
commite2a4ee1ac299755cdde4fa7f96283b7fe91987d8 (patch)
tree4e103cbc4470e2134c54cd91b7a0295d02f7498b /tests/expr.test
parent827f1718a3c6ad6738473fca1d9ca562ece38f91 (diff)
downloadtcl-e2a4ee1ac299755cdde4fa7f96283b7fe91987d8.zip
tcl-e2a4ee1ac299755cdde4fa7f96283b7fe91987d8.tar.gz
tcl-e2a4ee1ac299755cdde4fa7f96283b7fe91987d8.tar.bz2
1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
added tests for bug fixes
Diffstat (limited to 'tests/expr.test')
-rw-r--r--tests/expr.test10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test
index 17a4222..656c993 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -10,7 +10,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.test,v 1.5 1999/06/30 00:17:06 jenn Exp $
+# RCS: @(#) $Id: expr.test,v 1.6 1999/08/19 03:00:13 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -703,6 +703,14 @@ test expr-20.3 {broken substitution of integer digits} {
# fails with 8.0.x, but not 8.1b2
list [set a 000; expr 0x1$a] [set a 1; expr ${a}000]
} {4096 1000}
+test expr-20.4 {proper double evaluation compilation, error case} {
+ catch {unset a}; # make sure $a doesn't exist
+ list [catch {expr 1?{$a}:0} msg] $msg
+} {1 {can't read "a": no such variable}}
+test expr-20.5 {proper double evaluation compilation, working case} {
+ set a yellow
+ expr 1?{$a}:0
+} yellow
# cleanup
if {[info exists a]} {