aboutsummaryrefslogtreecommitdiff
path: root/tests/infoframe.test
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-08-17 08:21:39 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:50 +1000
commitcbc635e8f4de48408768053a976dc7bd7177ba7a (patch)
treebca1549fa15afc234868b5c46cd8a4a486f16b8f /tests/infoframe.test
parent75af5a8f20800977aabfd95fdfc403f851f8c459 (diff)
downloadjimtcl-cbc635e8f4de48408768053a976dc7bd7177ba7a.zip
jimtcl-cbc635e8f4de48408768053a976dc7bd7177ba7a.tar.gz
jimtcl-cbc635e8f4de48408768053a976dc7bd7177ba7a.tar.bz2
Clean up the indentation mess
Use 'indent'. Not perfect, but at least consistent. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/infoframe.test')
-rw-r--r--tests/infoframe.test37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/infoframe.test b/tests/infoframe.test
new file mode 100644
index 0000000..1a637ea
--- /dev/null
+++ b/tests/infoframe.test
@@ -0,0 +1,37 @@
+source testing.tcl
+
+proc a {n} {
+ if {$n eq "trace"} {
+ stacktrace
+ } else {
+ info frame $n
+ }
+}
+
+proc b {n} {
+ a $n
+}
+
+proc c {n} {
+ b $n
+}
+
+# --- Don't change line numbers above
+
+test info-frame-1.1 "Current proc" {
+ c 0
+} {a infoframe.test 12}
+
+test info-frame-1.2 "Caller" {
+ c -1
+} {b infoframe.test 16}
+
+test info-frame-1.3 "Caller of Caller" {
+ c -2
+} {c infoframe.test 30}
+
+test stacktrace-1.1 "Full stack trace" {
+ c trace
+} {a infoframe.test 12 b infoframe.test 16 c infoframe.test 34}
+
+testreport