summaryrefslogtreecommitdiffstats
path: root/tests/incr-old.test
diff options
context:
space:
mode:
authormdejong <mdejong>2003-02-06 22:44:56 (GMT)
committermdejong <mdejong>2003-02-06 22:44:56 (GMT)
commit8a99de882edc8565ff543a67a58e02f5f517ba7c (patch)
treedf7b90a9df2be40d32ff63faf11c6adc5c8ea2fd /tests/incr-old.test
parentd42212caff8b39b67e45ffb2f80c0ca9123a7cae (diff)
downloadtcl-8a99de882edc8565ff543a67a58e02f5f517ba7c.zip
tcl-8a99de882edc8565ff543a67a58e02f5f517ba7c.tar.gz
tcl-8a99de882edc8565ff543a67a58e02f5f517ba7c.tar.bz2
* generic/tclExecute.c (TclExecuteByteCode): When an
error is encountered reading the increment value during a compiled call to incr, add a "(reading increment)" error string to the errorInfo variable. This makes the errorInfo variable set by the compiled incr command match the value set by the non-compiled version. * tests/incr-old.test: Change errorInfo result for the compiled incr command case to match the modified implementation. * tests/incr.test: Add tests to make sure the compiled and non-compiled errorInfo messages are the same.
Diffstat (limited to 'tests/incr-old.test')
-rw-r--r--tests/incr-old.test5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/incr-old.test b/tests/incr-old.test
index 0344c42..1c78b82 100644
--- a/tests/incr-old.test
+++ b/tests/incr-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: incr-old.test,v 1.5 2000/04/10 17:19:00 ericm Exp $
+# RCS: @(#) $Id: incr-old.test,v 1.6 2003/02/06 22:44:58 mdejong Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -62,7 +62,8 @@ test incr-old-2.5 {incr errors} {
set x 123
list [catch {incr x 1a} msg] $msg $errorInfo
} {1 {expected integer but got "1a"} {expected integer but got "1a"
- while executing
+ (reading increment)
+ invoked from within
"incr x 1a"}}
test incr-old-2.6 {incr errors} {
proc readonly args {error "variable is read-only"}