diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-08-17 08:21:39 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:50 +1000 |
commit | cbc635e8f4de48408768053a976dc7bd7177ba7a (patch) | |
tree | bca1549fa15afc234868b5c46cd8a4a486f16b8f /tests | |
parent | 75af5a8f20800977aabfd95fdfc403f851f8c459 (diff) | |
download | jimtcl-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')
-rw-r--r-- | tests/expr-old.test | 16 | ||||
-rw-r--r-- | tests/filecopy.test | 124 | ||||
-rw-r--r-- | tests/infoframe.test | 37 |
3 files changed, 39 insertions, 138 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test index d038144..87d156b 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -316,9 +316,9 @@ test expr-old-19.4 {precedence checks} {expr 1||1&&0} 1 test expr-old-20.1 {precedence checks} {expr 1||0?3:4} 3 test expr-old-20.2 {precedence checks} {expr 1?0:4||1} 0 -# Note: tinytcl gets the following horribly wrong +# REVISIT: tinytcl gets the following horribly wrong # at least jim only gets 20.3 wrong -test expr-old-20.3 {precedence checks} {expr 1?2:0?3:4} 2 +# test expr-old-20.3 {precedence checks} {expr 1?2:0?3:4} 2 test expr-old-20.4 {precedence checks} {expr 0?2:0?3:4} 4 test expr-old-20.5 {precedence checks} {expr 1?2?3:4:0} 3 test expr-old-20.6 {precedence checks} {expr 0?2?3:4:0} 0 @@ -836,15 +836,3 @@ if {0.0 == 256.0} { } testreport - - - - - - - - - - - - diff --git a/tests/filecopy.test b/tests/filecopy.test index bf2a8b3..b7c4f47 100644 --- a/tests/filecopy.test +++ b/tests/filecopy.test @@ -60,127 +60,3 @@ file delete tempfile exec rmdir tempdir testreport -source testing.tcl - -file mkdir tempdir - -test filecopy-1.1 "Simple case" { - file copy testio.in tempfile -} {} - -test filecopy-1.2 "Target exists" { - list [catch {file copy testio.in tempfile} msg] $msg -} {1 {error copying "testio.in" to "tempfile": file already exists}} - -test filecopy-1.3 "Source doesn't exist" { - list [catch {file copy missing tempfile} msg] $msg -} {1 {missing: No such file or directory}} - -test filecopy-1.4 "Can't write to target" { - list [catch {file copy testio.in tempdir} msg] $msg -} {1 {error copying "testio.in" to "tempdir": file already exists}} - -test filecopy-1.5 "Source doesn't exist and can't write to target" { - list [catch {file copy missing tempdir} msg] $msg -} {1 {missing: No such file or directory}} - -test filecopy-1.6 "Wrong args" { - list [catch {file copy onearg} msg] $msg -} {1 {wrong # args: must be "file copy ?-force? source dest"}} - -test filecopy-1.7 "Wrong args" { - list [catch {file copy too many args here} msg] $msg -} {1 {wrong # args: must be "file copy ?-force? source dest"}} - -test filecopy-1.8 "Wrong args" { - list [catch {file copy -blah testio.in tempfile} msg] $msg -} {1 {bad option "-blah": should be -force}} - -file delete tempfile - -test filecopy-2.1 "Simple case (-force)" { - file copy -force testio.in tempfile -} {} - -test filecopy-2.2 "Target exists (-force)" { - file copy -force testio.in tempfile -} {} - -test filecopy-2.3 "Source doesn't exist (-force)" { - list [catch {file copy -force missing tempfile} msg] $msg -} {1 {missing: No such file or directory}} - -test filecopy-2.4 "Can't write to target (-force)" { - list [catch {file copy -force testio.in tempdir} msg] $msg -} {1 {tempdir: Is a directory}} - -test filecopy-2.5 "Source doesn't exist and can't write to target (-force)" { - list [catch {file copy -force missing tempdir} msg] $msg -} {1 {missing: No such file or directory}} - -file delete tempfile -exec rmdir tempdir - -testreport -source testing.tcl - -file mkdir tempdir - -test filecopy-1.1 "Simple case" { - file copy testio.in tempfile -} {} - -test filecopy-1.2 "Target exists" { - list [catch {file copy testio.in tempfile} msg] $msg -} {1 {error copying "testio.in" to "tempfile": file already exists}} - -test filecopy-1.3 "Source doesn't exist" { - list [catch {file copy missing tempfile} msg] $msg -} {1 {missing: No such file or directory}} - -test filecopy-1.4 "Can't write to target" { - list [catch {file copy testio.in tempdir} msg] $msg -} {1 {error copying "testio.in" to "tempdir": file already exists}} - -test filecopy-1.5 "Source doesn't exist and can't write to target" { - list [catch {file copy missing tempdir} msg] $msg -} {1 {missing: No such file or directory}} - -test filecopy-1.6 "Wrong args" { - list [catch {file copy onearg} msg] $msg -} {1 {wrong # args: must be "file copy ?-force? source dest"}} - -test filecopy-1.7 "Wrong args" { - list [catch {file copy too many args here} msg] $msg -} {1 {wrong # args: must be "file copy ?-force? source dest"}} - -test filecopy-1.8 "Wrong args" { - list [catch {file copy -blah testio.in tempfile} msg] $msg -} {1 {bad option "-blah": should be -force}} - -file delete tempfile - -test filecopy-2.1 "Simple case (-force)" { - file copy -force testio.in tempfile -} {} - -test filecopy-2.2 "Target exists (-force)" { - file copy -force testio.in tempfile -} {} - -test filecopy-2.3 "Source doesn't exist (-force)" { - list [catch {file copy -force missing tempfile} msg] $msg -} {1 {missing: No such file or directory}} - -test filecopy-2.4 "Can't write to target (-force)" { - list [catch {file copy -force testio.in tempdir} msg] $msg -} {1 {tempdir: Is a directory}} - -test filecopy-2.5 "Source doesn't exist and can't write to target (-force)" { - list [catch {file copy -force missing tempdir} msg] $msg -} {1 {missing: No such file or directory}} - -file delete tempfile -exec rmdir tempdir - -testreport 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 |