diff options
author | dgp <dgp@users.sourceforge.net> | 2013-01-30 16:52:11 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-01-30 16:52:11 (GMT) |
commit | 125d2d9436143ba4be3c8022c075f740daf74d89 (patch) | |
tree | 1d44a12932fa4f790114d1ad3ecb71b4f31904f5 /tests/tcltest.test | |
parent | 3ce2fd86c38af0146def2b91532a0acaff7b95b8 (diff) | |
parent | 43d19efc4e1c708bb7710e1475d0465e42bc3c53 (diff) | |
download | tcl-125d2d9436143ba4be3c8022c075f740daf74d89.zip tcl-125d2d9436143ba4be3c8022c075f740daf74d89.tar.gz tcl-125d2d9436143ba4be3c8022c075f740daf74d89.tar.bz2 |
Fradin improvements in test suite too
Diffstat (limited to 'tests/tcltest.test')
-rwxr-xr-x | tests/tcltest.test | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/tcltest.test b/tests/tcltest.test index 86aca6f..ce8d617 100755 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -80,10 +80,7 @@ proc slave {msgVar args} { # Need to capture output in msg - set code [catch {i eval {source $argv0}} foo] -if $code { -#puts "$code: $foo\n$::errorInfo" -} + set code [catch {i eval {source $argv0}}] i eval {close $tcltest::outputChannel} interp delete [namespace current]::i set f [open $of] @@ -99,8 +96,6 @@ if $code { append msg \n$err } return $code - -# return [catch {uplevel 1 [linsert $args 0 exec [interpreter]]} msg] } test tcltest-2.0 {tcltest (verbose default - 'b')} {unixOrPc} { set result [slave msg test.tcl] @@ -549,7 +544,7 @@ set notWriteableDir [file join [temporaryDirectory] notwriteable] makeDirectory notreadable makeDirectory notwriteable switch -- $::tcl_platform(platform) { - "unix" { + unix { file attributes $notReadableDir -permissions 00333 file attributes $notWriteableDir -permissions 00555 } @@ -716,8 +711,8 @@ test tcltest-8.60 {::workingDirectory} { # clean up from directory testing -switch $::tcl_platform(platform) { - "unix" { +switch -- $::tcl_platform(platform) { + unix { file attributes $notReadableDir -permissions 777 file attributes $notWriteableDir -permissions 777 } @@ -727,7 +722,7 @@ switch $::tcl_platform(platform) { } } -file delete -force $notReadableDir $notWriteableDir +file delete -force -- $notReadableDir $notWriteableDir removeFile a.tcl removeFile thisdirectoryisafile removeDirectory normaldirectory @@ -1150,7 +1145,7 @@ test tcltest-19.1 {TCLTEST_OPTIONS default} -setup { } -cleanup { interp delete slave2 interp delete slave1 - if {$oldoptions == "none"} { + if {$oldoptions eq "none"} { unset ::env(TCLTEST_OPTIONS) } else { set ::env(TCLTEST_OPTIONS) $oldoptions |