diff options
author | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
commit | 9995355714bc90faf7c2e345b3d6a1d041447097 (patch) | |
tree | 2ad97c5b1994495118cef4df947cf16b55e326f2 /tests/cmdAH.test | |
parent | e13392595faf8e8d0d1c3c514ce160cfadc3d372 (diff) | |
download | tcl-9995355714bc90faf7c2e345b3d6a1d041447097.zip tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.gz tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.bz2 |
merging changes from 8.0.3 into 8.1a2
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r-- | tests/cmdAH.test | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 4c23dae..2e473fe 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -9,12 +9,12 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# SCCS: @(#) cmdAH.test 1.41 98/02/02 21:59:54 +# RCS: @(#) $Id: cmdAH.test,v 1.1.2.2 1998/09/24 23:59:20 stanton Exp $ if {[string compare test [info procs test]] == 1} then {source defs} global env -set platform [testgetplatform] +catch {set platform [testgetplatform]} test cmdAH-1.1 {Tcl_CdObjCmd} { list [catch {cd foo bar} msg] $msg @@ -107,6 +107,10 @@ test cmdAH-4.1 {Tcl_FileObjCmd - file attrs} { # dirname +if {[info commands testsetplatform] == {}} { + puts "This application hasn't been compiled with the \"testsetplatform\"" + puts "command, so I can't test Tcl_FileObjCmd etc." +} else { test cmdAH-5.1 {Tcl_FileObjCmd: dirname} { testsetplatform unix list [catch {file dirname a b} msg] $msg @@ -895,11 +899,17 @@ test cmdAH-12.1 {Tcl_FileObjCmd} { } {1 {user "_bad_user" doesn't exist}} testsetplatform $platform -makeFile abcde gorp.file -makeDirectory dir.file +} # readable +if {[info commands testchmod] == {}} { + puts "This application hasn't been compiled with the \"testchmod\"" + puts "command, so I can't test Tcl_FileObjCmd etc." +} else { +makeFile abcde gorp.file +makeDirectory dir.file + test cmdAH-13.1 {Tcl_FileObjCmd: readable} { list [catch {file readable a b} msg] $msg } {1 {wrong # args: should be "file readable name"}} @@ -971,6 +981,8 @@ test cmdAH-15.6 {Tcl_FileObjCmd: executable} { file delete -force dir.file file delete gorp.file file delete link.file +} + # exists test cmdAH-16.1 {Tcl_FileObjCmd: exists} { @@ -993,6 +1005,10 @@ test cmdAH-16.5 {Tcl_FileObjCmd: exists} { } 1 # nativename +if {[info commands testsetplatform] == {}} { + puts "This application hasn't been compiled with the \"testsetplatform\"" + puts "command, so I can't test Tcl_FileObjCmd etc." +} else { test cmdAH-16.6 {Tcl_FileObjCmd: nativename} { testsetplatform unix list [catch {file nativename a/b} msg] $msg [testsetplatform $platform] @@ -1005,6 +1021,7 @@ test cmdAH-16.8 {Tcl_FileObjCmd: nativename} { testsetplatform mac list [catch {file nativename a/b} msg] $msg [testsetplatform $platform] } {0 :a:b {}} +} test cmdAH-16.9 {Tcl_FileObjCmd: ~ : exists} { file exists ~nOsUcHuSeR @@ -1036,7 +1053,7 @@ if {$tcl_platform(platform) == "unix"} { # Stat related commands -testsetplatform $platform +catch {testsetplatform $platform} file delete gorp.file makeFile "Test string" gorp.file catch {exec chmod 765 gorp.file} @@ -1206,7 +1223,7 @@ test cmdAH-24.3 {Tcl_FileObjCmd: size} { # stat -testsetplatform $platform +catch {testsetplatform $platform} makeFile "Test string" gorp.file catch {exec chmod 765 gorp.file} @@ -1344,7 +1361,7 @@ test cmdAH-27.8 {error conditions} { list [catch {file dirname ~woohgy} msg] $msg } {1 {user "woohgy" doesn't exist}} -testsetplatform $platform +catch {testsetplatform $platform} catch {unset platform} catch {exec chmod 777 dir.file} |