summaryrefslogtreecommitdiffstats
path: root/tests/info.test
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-07-25 23:06:19 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-07-25 23:06:19 (GMT)
commit496f531a89bb73a3d70a47ab4ef3d124081806ec (patch)
tree7a1766e9cce695d11c8e151aaae7c37561c66c45 /tests/info.test
parente6ab7a094e17c5ecfaed583a37feb06afbc6bd94 (diff)
downloadtcl-496f531a89bb73a3d70a47ab4ef3d124081806ec.zip
tcl-496f531a89bb73a3d70a47ab4ef3d124081806ec.tar.gz
tcl-496f531a89bb73a3d70a47ab4ef3d124081806ec.tar.bz2
* test/info.test: More work on singleTestInterp usability. This
fixes bug [1605269].
Diffstat (limited to 'tests/info.test')
-rw-r--r--tests/info.test106
1 files changed, 55 insertions, 51 deletions
diff --git a/tests/info.test b/tests/info.test
index 5b83ed2..d68da9f 100644
--- a/tests/info.test
+++ b/tests/info.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: info.test,v 1.56 2008/07/25 22:11:21 andreas_kupries Exp $
+# RCS: @(#) $Id: info.test,v 1.57 2008/07/25 23:06:21 andreas_kupries Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -768,16 +768,26 @@ test info-22.8 {info frame, basic trace} -match glob -body {
* {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}}
## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0
-test info-23.0 {eval'd info frame} {!singleTestInterp} {
+test info-23.0.0 {eval'd info frame} {!singleTestInterp} {
eval {info frame}
} 8
-test info-23.1 {eval'd info frame, semi-dynamic} {!singleTestInterp} {
+test info-23.0.1 {eval'd info frame} -constraints {singleTestInterp} -match glob -body {
+ eval {info frame}
+} -result {1[12]} ;# SingleTestInterp results changes depending on running the whole suite, or info.test alone.
+test info-23.1.0 {eval'd info frame, semi-dynamic} {!singleTestInterp} {
eval info frame
} 8
-test info-23.2 {eval'd info frame, dynamic} {!singleTestInterp} {
+test info-23.1.1 {eval'd info frame, semi-dynamic} -constraints {singleTestInterp} -match glob -body {
+ eval info frame
+} -result {1[12]}
+test info-23.2.0 {eval'd info frame, dynamic} {!singleTestInterp} {
set script {info frame}
eval $script
} 8
+test info-23.2.1 {eval'd info frame, dynamic} -constraints {singleTestInterp} -match glob -body {
+ set script {info frame}
+ eval $script
+} -result {1[12]}
test info-23.3 {eval'd info frame, literal} {
eval {
info frame 0
@@ -790,18 +800,12 @@ test info-23.5 {eval'd info frame, dynamic} {
set script {info frame 0}
eval $script
} {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest}
-test info-23.6 {eval'd info frame, trace} -constraints {!singleTestInterp} -match glob -body {
+test info-23.6 {eval'd info frame, trace} -match glob -body {
set script {etrace}
- join [eval $script] \n
-} -result {9 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
-8 {type eval line 1 cmd etrace proc ::tcltest::RunTest}
-7 {type source line 800 file info.test cmd {eval $script} proc ::tcltest::RunTest}
-6 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}
-5 {type eval line 1 cmd {::tcltest::RunTest info-23} proc ::tcltest::Eval}
-4 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::Eval}
-3 {type eval line 1 cmd ::tcltest::Eval\\ \\\{::tcltest::RunTest\\ info-23 proc ::tcltest::test}
-2 {type source line * file tcltest.tcl cmd {uplevel 1 \[list \[namespace origin Eval\] $command 1\]} proc ::tcltest::test}
-1 {type source line 798 file info.test cmd {test info-23.6 {eval'd info frame, trace} -constraints {!singleTestInterp} -match glob -bo} level 1}}
+ join [lrange [eval $script] 0 2] \n
+} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
+* {type eval line 1 cmd etrace proc ::tcltest::RunTest}
+* {type source line 805 file info.test cmd {eval $script} proc ::tcltest::RunTest}}
## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0
# -------------------------------------------------------------------------
@@ -825,7 +829,7 @@ test info-24.0 {info frame, interaction, namespace eval} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 826 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 825 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -839,7 +843,7 @@ test info-24.1 {info frame, interaction, if} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 840 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 839 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -854,7 +858,7 @@ test info-24.2 {info frame, interaction, while} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 854 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 853 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -867,7 +871,7 @@ test info-24.3 {info frame, interaction, catch} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 868 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 867 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -881,7 +885,7 @@ test info-24.4 {info frame, interaction, foreach} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 881 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 880 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -895,7 +899,7 @@ test info-24.5 {info frame, interaction, for} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 895 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 894 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -912,7 +916,7 @@ test info-24.6.0 {info frame, interaction, switch, list body} -body {
} -cleanup {
namespace delete foo
unset x
-} -result {type source line 911 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 910 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -927,7 +931,7 @@ test info-24.6.1 {info frame, interaction, switch, multi-body} -body {
} -cleanup {
namespace delete foo
unset x
-} -result {type source line 927 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 926 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -953,7 +957,7 @@ dict for {k v} {foo bar} {
test info-24.7 {info frame, interaction, dict for} {
reduce [foo::bar]
-} {type source line 956 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} {type source line 955 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -967,7 +971,7 @@ dict with thedict {
test info-24.8 {info frame, interaction, dict with} {
reduce [foo::bar]
-} {type source line 970 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} {type source line 969 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
unset thedict
@@ -982,7 +986,7 @@ dict filter {foo bar} script {k v} {
test info-24.9 {info frame, interaction, dict filter} {
reduce [foo::bar]
-} {type source line 984 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} {type source line 983 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
unset x
@@ -995,14 +999,14 @@ eval {
test info-25.0 {info frame, proc in eval} {
reduce [bar]
-} {type source line 998 file info.test cmd {info frame 0} proc ::bar level 0}
+} {type source line 997 file info.test cmd {info frame 0} proc ::bar level 0}
# Don't need to clean up yet...
proc bar {} {info frame 0}
test info-25.1 {info frame, regular proc} {
reduce [bar]
-} {type source line 1006 file info.test cmd {info frame 0} proc ::bar level 0}
+} {type source line 1005 file info.test cmd {info frame 0} proc ::bar level 0}
rename bar {}
@@ -1114,7 +1118,7 @@ test info-33.0 {{*}, literal, direct} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 1116 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1115 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -1130,7 +1134,7 @@ test info-33.1 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 1131 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1130 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -1141,7 +1145,7 @@ namespace {*}"
"
test info-33.2 {{*}, literal, direct} {
reduce [foo::bar]
-} {type source line 1145 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} {type source line 1144 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -1167,7 +1171,7 @@ proc foo::bar {} {
}
test info-33.3 {{*}, literal, simple, bytecompiled} {
reduce [foo::bar]
-} {type source line 1170 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} {type source line 1169 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -1229,7 +1233,7 @@ proc foo {} {
}
test info-35.0 {apply, literal} {
reduce [foo]
-} {type source line 1232 file info.test cmd {info frame 0} lambda {
+} {type source line 1231 file info.test cmd {info frame 0} lambda {
{x y}
{info frame 0}
} level 0}
@@ -1258,7 +1262,7 @@ proc foo::bar {} {
}
test info-36.0 {info frame, dict for, bcc} -body {
reduce [foo::bar]
-} -result {type source line 1260 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1259 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -1275,7 +1279,7 @@ proc foo::bar {} {
test info-36.1.0 {switch, list literal, bcc} -body {
reduce [foo::bar]
-} -result {type source line 1276 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1275 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -1290,7 +1294,7 @@ proc foo::bar {} {
test info-36.1.1 {switch, multi-body literals, bcc} -body {
reduce [foo::bar]
-} -result {type source line 1292 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1291 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -1357,7 +1361,7 @@ test info-38.1 {location information for uplevel, dv, direct-var} -match glob -b
join [lrange [uplevel \#0 $script] 0 2] \n
} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
* {type eval line 3 cmd etrace proc ::tcltest::RunTest}
-* {type source line 1362 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}}
+* {type source line 1361 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}}
test info-38.2 {location information for uplevel, dl, direct-literal} -match glob -body {
join [lrange [uplevel \#0 {
@@ -1365,8 +1369,8 @@ test info-38.2 {location information for uplevel, dl, direct-literal} -match glo
etrace
}] 0 2] \n
} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
-* {type source line 1370 file info.test cmd etrace proc ::tcltest::RunTest}
-* {type source line 1368 file info.test cmd uplevel\\ \\\\ proc ::tcltest::RunTest}}
+* {type source line 1369 file info.test cmd etrace proc ::tcltest::RunTest}
+* {type source line 1367 file info.test cmd uplevel\\ \\\\ proc ::tcltest::RunTest}}
test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match glob -body {
set script {
@@ -1376,8 +1380,8 @@ test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match g
join [lrange [control y $script] 0 3] \n
} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
* {type eval line 3 cmd etrace proc ::control}
-* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control}
-* {type source line 1381 file info.test cmd {control y $script} proc ::tcltest::RunTest}}
+* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control}
+* {type source line 1380 file info.test cmd {control y $script} proc ::tcltest::RunTest}}
test info-38.4 {location information for uplevel, dpv, direct-proc-literal} -match glob -body {
join [lrange [control y {
@@ -1385,25 +1389,25 @@ test info-38.4 {location information for uplevel, dpv, direct-proc-literal} -mat
etrace
}] 0 3] \n
} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
-* {type source line 1390 file info.test cmd etrace proc ::control}
-* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control}
-* {type source line 1388 file info.test cmd control proc ::tcltest::RunTest}}
+* {type source line 1389 file info.test cmd etrace proc ::control}
+* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control}
+* {type source line 1387 file info.test cmd control proc ::tcltest::RunTest}}
test info-38.5 {location information for uplevel, ppv, proc-proc-var} -match glob -body {
join [lrange [datav] 0 4] \n
} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
* {type eval line 3 cmd etrace proc ::control}
-* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control}
-* {type source line 1354 file info.test cmd {control y $script} proc ::datav level 1}
-* {type source line 1398 file info.test cmd datav proc ::tcltest::RunTest}}
+* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control}
+* {type source line 1353 file info.test cmd {control y $script} proc ::datav level 1}
+* {type source line 1397 file info.test cmd datav proc ::tcltest::RunTest}}
test info-38.6 {location information for uplevel, ppl, proc-proc-literal} -match glob -body {
join [lrange [datal] 0 4] \n
} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0}
-* {type source line 1345 file info.test cmd etrace proc ::control}
-* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control}
-* {type source line 1343 file info.test cmd control proc ::datal level 1}
-* {type source line 1406 file info.test cmd datal proc ::tcltest::RunTest}}
+* {type source line 1344 file info.test cmd etrace proc ::control}
+* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control}
+* {type source line 1342 file info.test cmd control proc ::datal level 1}
+* {type source line 1405 file info.test cmd datal proc ::tcltest::RunTest}}
# -------------------------------------------------------------------------