summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-19 10:34:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-19 10:34:31 (GMT)
commita2fa2a169f18995949a89c1ff0de30dce5d69cff (patch)
treed9b723448fa129576c7c0f10cf38f54211381ab6 /tests
parent24e58b6dcd4b44327247cc7597c1ab1e08df023c (diff)
parent54ab86e08cf1c4b8cac8864c56c4bf48435fa0b9 (diff)
downloadtcl-a2fa2a169f18995949a89c1ff0de30dce5d69cff.zip
tcl-a2fa2a169f18995949a89c1ff0de30dce5d69cff.tar.gz
tcl-a2fa2a169f18995949a89c1ff0de30dce5d69cff.tar.bz2
Fix bug #2438181: Incorrect error reporting in traces.
Test-case and fix provided by Poor Yorick.
Diffstat (limited to 'tests')
-rw-r--r--tests/trace.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 9c3a686..27e23c4 100644
--- a/tests/trace.test
+++ b/tests/trace.test
@@ -1667,6 +1667,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