summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-19 11:36:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-19 11:36:12 (GMT)
commit3eafe75fbc925da366e32a959d479a254ebfc02a (patch)
tree0b4fe40c61217c72dd682087696ae4a1236f9ff7 /tests/trace.test
parent34480654e98d2543e4d9a16e4cd5cbcc5630b604 (diff)
parentf8e35a6396aefc1ffbb6a104b8cfd659e1afa2d9 (diff)
downloadtcl-3eafe75fbc925da366e32a959d479a254ebfc02a.zip
tcl-3eafe75fbc925da366e32a959d479a254ebfc02a.tar.gz
tcl-3eafe75fbc925da366e32a959d479a254ebfc02a.tar.bz2
Fix bug #2438181: Incorrect error reporting in traces.
Test-case and fix provided by Poor Yorick.
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/trace.test b/tests/trace.test
index b4957c0..41ad00d 100644
--- a/tests/trace.test
+++ b/tests/trace.test
@@ -1670,6 +1670,16 @@ test trace-21.11 {trace execution and alias} -setup {
rename ::x {}
} -result {:: ::}
+proc set2 args {
+ set {*}$args
+}
+
+test trace-21.12 {bug 2438181} -setup {
+ trace add execution set2 leave {puts one two three #;}
+} -body {
+ set2 a hello
+} -returnCodes 1 -result {wrong # args: should be "puts ?-nonewline? ?channelId? string"}
+
proc factorial {n} {
if {$n != 1} { return [expr {$n * [factorial [expr {$n -1 }]]}] }
return 1