summaryrefslogtreecommitdiffstats
path: root/tests/info.test
diff options
context:
space:
mode:
authorandreas_kupries <andreas_kupries@noemail.net>2008-07-23 21:43:22 (GMT)
committerandreas_kupries <andreas_kupries@noemail.net>2008-07-23 21:43:22 (GMT)
commitc165baa6cc536ae5e1562d2731ee1f0d4d51c6da (patch)
tree4e1d1d2584506c81fcde602838008df9ca0a6b61 /tests/info.test
parentf6f4beb16f797b09b42c29a52b6486b071774de4 (diff)
downloadtcl-c165baa6cc536ae5e1562d2731ee1f0d4d51c6da.zip
tcl-c165baa6cc536ae5e1562d2731ee1f0d4d51c6da.tar.gz
tcl-c165baa6cc536ae5e1562d2731ee1f0d4d51c6da.tar.bz2
* tests/info.test: Reordered the tests to have monotonously
increasing numbers. FossilOrigin-Name: ea9e096338af0a42f9f2ab802ca500ab3f4540ad
Diffstat (limited to 'tests/info.test')
-rw-r--r--tests/info.test308
1 files changed, 154 insertions, 154 deletions
diff --git a/tests/info.test b/tests/info.test
index b1f6a40..a50ba84 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.53 2008/07/23 21:07:45 andreas_kupries Exp $
+# RCS: @(#) $Id: info.test,v 1.54 2008/07/23 21:43:23 andreas_kupries Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -904,20 +904,110 @@ test info-24.5 {info frame, interaction, for} -body {
# -------------------------------------------------------------------------
+namespace eval foo {}
+set x foo
+switch -exact -- $x {
+ foo {
+ proc ::foo::bar {} {info frame 0}
+ }
+}
+
+test info-24.6.0 {info frame, interaction, switch, list body} -body {
+ reduce [foo::bar]
+} -cleanup {
+ namespace delete foo
+ unset x
+} -result {type source line 911 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+
+# -------------------------------------------------------------------------
+
+namespace eval foo {}
+set x foo
+switch -exact -- $x foo {
+ proc ::foo::bar {} {info frame 0}
+}
+
+test info-24.6.1 {info frame, interaction, switch, multi-body} -body {
+ reduce [foo::bar]
+} -cleanup {
+ namespace delete foo
+ unset x
+} -result {type source line 927 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+
+# -------------------------------------------------------------------------
+
+namespace eval foo {}
+set x foo
+switch -exact -- $x [list foo {
+ proc ::foo::bar {} {info frame 0}
+}]
+
+test info-24.6.2 {info frame, interaction, switch, list body, dynamic} -body {
+ reduce [foo::bar]
+} -cleanup {
+ namespace delete foo
+ unset x
+} -result {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0}
+
+# -------------------------------------------------------------------------
+
+namespace eval foo {}
+dict for {k v} {foo bar} {
+ proc ::foo::bar {} {info frame 0}
+}
+
+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}
+
+namespace delete foo
+
+# -------------------------------------------------------------------------
+
+namespace eval foo {}
+set thedict {foo bar}
+dict with thedict {
+ proc ::foo::bar {} {info frame 0}
+}
+
+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}
+
+namespace delete foo
+unset thedict
+
+# -------------------------------------------------------------------------
+
+namespace eval foo {}
+dict filter {foo bar} script {k v} {
+ proc ::foo::bar {} {info frame 0}
+ set x 1
+}
+
+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}
+
+namespace delete foo
+unset x
+
+# -------------------------------------------------------------------------
+
eval {
proc bar {} {info frame 0}
}
test info-25.0 {info frame, proc in eval} {
reduce [bar]
-} {type source line 908 file info.test cmd {info frame 0} proc ::bar level 0}
+} {type source line 998 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 916 file info.test cmd {info frame 0} proc ::bar level 0}
+} {type source line 1006 file info.test cmd {info frame 0} proc ::bar level 0}
rename bar {}
@@ -986,53 +1076,6 @@ test info-31.6 {eval, script in variable} {
# -------------------------------------------------------------------------
-namespace eval foo {}
-set x foo
-switch -exact -- $x {
- foo {
- proc ::foo::bar {} {info frame 0}
- }
-}
-
-test info-24.6.0 {info frame, interaction, switch, list body} -body {
- reduce [foo::bar]
-} -cleanup {
- namespace delete foo
- unset x
-} -result {type source line 993 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-# -------------------------------------------------------------------------
-
-namespace eval foo {}
-set x foo
-switch -exact -- $x foo {
- proc ::foo::bar {} {info frame 0}
-}
-
-test info-24.6.1 {info frame, interaction, switch, multi-body} -body {
- reduce [foo::bar]
-} -cleanup {
- namespace delete foo
- unset x
-} -result {type source line 1009 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-# -------------------------------------------------------------------------
-
-namespace eval foo {}
-set x foo
-switch -exact -- $x [list foo {
- proc ::foo::bar {} {info frame 0}
-}]
-
-test info-24.6.2 {info frame, interaction, switch, list body, dynamic} -body {
- reduce [foo::bar]
-} -cleanup {
- namespace delete foo
- unset x
-} -result {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0}
-
-# -------------------------------------------------------------------------
-
set body {
foo {
proc ::foo::bar {} {info frame 0}
@@ -1076,7 +1119,7 @@ test info-33.0 {{*}, literal, direct} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 1073 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1116 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
@@ -1092,7 +1135,59 @@ test info-33.1 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
-} -result {type source line 1088 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1131 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+
+# -------------------------------------------------------------------------
+
+namespace {*}"
+ eval
+ foo
+ {proc bar {} {info frame 0}}
+"
+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}
+
+namespace delete foo
+
+# -------------------------------------------------------------------------
+
+namespace {*}"eval\nfoo\n{proc bar {} {info frame 0}}\n"
+
+test info-33.2a {{*}, literal, not simple, direct} {
+ reduce [foo::bar]
+} {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0}
+
+namespace delete foo
+
+# -------------------------------------------------------------------------
+
+namespace eval foo {}
+proc foo::bar {} {
+ set flag 1
+ if {*}"
+ {1}
+ {info frame 0}
+ "
+}
+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}
+
+namespace delete foo
+
+# -------------------------------------------------------------------------
+
+namespace eval foo {}
+proc foo::bar {} {
+ set flag 1
+ if {*}"\n{1}\n{info frame 0}"
+}
+test info-33.3a {{*}, literal, not simple, bytecompiled} {
+ reduce [foo::bar]
+} {type eval line 1 cmd {info frame 0} proc ::foo::bar level 0}
+
+namespace delete foo
# -------------------------------------------------------------------------
@@ -1139,7 +1234,7 @@ proc foo {} {
}
test info-35.0 {apply, literal} {
reduce [foo]
-} {type source line 1137 file info.test cmd {info frame 0} lambda {
+} {type source line 1232 file info.test cmd {info frame 0} lambda {
{x y}
{info frame 0}
} level 0}
@@ -1160,58 +1255,15 @@ unset lambda
# -------------------------------------------------------------------------
namespace eval foo {}
-dict for {k v} {foo bar} {
- proc ::foo::bar {} {info frame 0}
-}
-
-test info-24.7 {info frame, interaction, dict for} {
- reduce [foo::bar]
-} {type source line 1164 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-namespace delete foo
-
-# -------------------------------------------------------------------------
-
-namespace eval foo {}
-set thedict {foo bar}
-dict with thedict {
- proc ::foo::bar {} {info frame 0}
-}
-
-test info-24.8 {info frame, interaction, dict with} {
- reduce [foo::bar]
-} {type source line 1178 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-namespace delete foo
-unset thedict
-
-# -------------------------------------------------------------------------
-
-namespace eval foo {}
-dict filter {foo bar} script {k v} {
- proc ::foo::bar {} {info frame 0}
- set x 1
-}
-
-test info-24.9 {info frame, interaction, dict filter} {
- reduce [foo::bar]
-} {type source line 1192 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-namespace delete foo
-unset x
-
-# -------------------------------------------------------------------------
-
-namespace eval foo {}
proc foo::bar {} {
dict for {k v} {foo bar} {
set x [info frame 0]
}
set x
}
-test info-36.0 {info frame, dict for, bcc} {
+test info-36.0 {info frame, dict for, bcc} -body {
reduce [foo::bar]
-} {type source line 1208 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1260 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -1226,9 +1278,9 @@ proc foo::bar {} {
set y
}
-test info-36.1.0 {switch, list literal, bcc} {
+test info-36.1.0 {switch, list literal, bcc} -body {
reduce [foo::bar]
-} {type source line 1224 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1276 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo
@@ -1241,61 +1293,9 @@ proc foo::bar {} {
set y
}
-test info-36.1.1 {switch, multi-body literals, bcc} {
+test info-36.1.1 {switch, multi-body literals, bcc} -body {
reduce [foo::bar]
-} {type source line 1240 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-namespace delete foo
-
-# -------------------------------------------------------------------------
-
-namespace {*}"
- eval
- foo
- {proc bar {} {info frame 0}}
-"
-test info-33.2 {{*}, literal, direct} {
- reduce [foo::bar]
-} {type source line 1255 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-namespace delete foo
-
-# -------------------------------------------------------------------------
-
-namespace {*}"eval\nfoo\n{proc bar {} {info frame 0}}\n"
-
-test info-33.2a {{*}, literal, not simple, direct} {
- reduce [foo::bar]
-} {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0}
-
-namespace delete foo
-
-# -------------------------------------------------------------------------
-
-namespace eval foo {}
-proc foo::bar {} {
- set flag 1
- if {*}"
- {1}
- {info frame 0}
- "
-}
-test info-33.3 {{*}, literal, simple, bytecompiled} {
- reduce [foo::bar]
-} {type source line 1280 file info.test cmd {info frame 0} proc ::foo::bar level 0}
-
-namespace delete foo
-
-# -------------------------------------------------------------------------
-
-namespace eval foo {}
-proc foo::bar {} {
- set flag 1
- if {*}"\n{1}\n{info frame 0}"
-}
-test info-33.3a {{*}, literal, not simple, bytecompiled} {
- reduce [foo::bar]
-} {type eval line 1 cmd {info frame 0} proc ::foo::bar level 0}
+} -result {type source line 1292 file info.test cmd {info frame 0} proc ::foo::bar level 0}
namespace delete foo