diff options
author | dgp <dgp@users.sourceforge.net> | 2013-07-10 19:43:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-07-10 19:43:56 (GMT) |
commit | ef77c88392ff7b5d78b792b9d684a4ba30d175cc (patch) | |
tree | 764dee0b2092f673b7c10199ceb02f0bfa3f0f67 /tests | |
parent | 6f87f7f3302077aa68a48258e328bbf2ee5abd51 (diff) | |
download | tcl-ef77c88392ff7b5d78b792b9d684a4ba30d175cc.zip tcl-ef77c88392ff7b5d78b792b9d684a4ba30d175cc.tar.gz tcl-ef77c88392ff7b5d78b792b9d684a4ba30d175cc.tar.bz2 |
Add tests for SetLineInformation() calls in tclCompCmdsGR.c.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/info.test | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/info.test b/tests/info.test index 98bb724..98f6ea7 100644 --- a/tests/info.test +++ b/tests/info.test @@ -2109,6 +2109,59 @@ test info-33.13 {{*}, literal, simple, bytecompiled} -body { } -result {type source line 2101 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- +namespace eval foo {} +proc foo::bar {} { + if {*}{ + {[return [info frame 0]]} + {} + } +} +test info-33.14 {{*}, literal, simple, bytecompiled} -body { + reduce [foo::bar] +} -cleanup { + namespace delete foo +} -result {type source line 2115 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- +namespace eval foo {} +proc foo::bar {} { + if 0 {*}{ + {} else + {return [info frame 0]} + } +} +test info-33.15 {{*}, literal, simple, bytecompiled} -body { + reduce [foo::bar] +} -cleanup { + namespace delete foo +} -result {type source line 2130 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- +namespace eval foo {} +proc foo::bar {} { + incr {*}{ + x + } [return [info frame 0]] +} +test info-33.16 {{*}, literal, simple, bytecompiled} -body { + reduce [foo::bar] +} -cleanup { + namespace delete foo +} -result {type source line 2144 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- +namespace eval foo {} +proc foo::bar {} { + info level {*}{ + } [return [info frame 0]] +} +test info-33.16 {{*}, literal, simple, bytecompiled} -body { + reduce [foo::bar] +} -cleanup { + namespace delete foo +} -result {type source line 2156 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- unset -nocomplain res # cleanup |