summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdAH.test13
-rw-r--r--tests/fCmd.test7
-rw-r--r--tests/ioUtil.test6
-rw-r--r--tests/unixFCmd.test20
-rw-r--r--tests/winFile.test6
5 files changed, 30 insertions, 22 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 9b26f8e..9d7dca1 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: cmdAH.test,v 1.30.2.1 2003/03/18 10:51:31 vincentdarley Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.30.2.2 2003/04/14 15:45:51 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -86,6 +86,9 @@ test cmdAH-2.5 {Tcl_CdObjCmd} {
test cmdAH-2.6 {Tcl_CdObjCmd} {
list [catch {cd _foobar} msg] $msg
} {1 {couldn't change working directory to "_foobar": no such file or directory}}
+test cmdAH-2.6.1 {Tcl_CdObjCmd} {
+ list [catch {cd ""} msg] $msg
+} {1 {couldn't change working directory to "": no such file or directory}}
test cmdAH-2.7 {Tcl_ConcatObjCmd} {
concat
@@ -396,12 +399,12 @@ test cmdAH-8.42 {Tcl_FileObjCmd: dirname} {
test cmdAH-8.43 {Tcl_FileObjCmd: dirname} {
global env
set temp $env(HOME)
- set env(HOME) "/home/test"
+ set env(HOME) "/homewontexist/test"
testsetplatform unix
set result [list [catch {file dirname ~} msg] $msg]
set env(HOME) $temp
set result
-} [list 0 [expr {([file exists /home] && ([file type /home] == "link")) ? [file readlink /home] : "/home"}]]
+} {0 /homewontexist}
test cmdAH-8.44 {Tcl_FileObjCmd: dirname} {
global env
set temp $env(HOME)
@@ -414,12 +417,12 @@ test cmdAH-8.44 {Tcl_FileObjCmd: dirname} {
test cmdAH-8.45 {Tcl_FileObjCmd: dirname} {
global env
set temp $env(HOME)
- set env(HOME) "/home/test"
+ set env(HOME) "/homewontexist/test"
testsetplatform windows
set result [list [catch {file dirname ~} msg] $msg]
set env(HOME) $temp
set result
-} [list 0 [expr {([file exists /home] && ([file type /home] == "link")) ? [file readlink /home] : "/home"}]]
+} {0 /homewontexist}
test cmdAH-8.46 {Tcl_FileObjCmd: dirname} {
global env
set temp $env(HOME)
diff --git a/tests/fCmd.test b/tests/fCmd.test
index e3bec24..c704032 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fCmd.test,v 1.26 2003/02/12 19:18:13 vincentdarley Exp $
+# RCS: @(#) $Id: fCmd.test,v 1.26.2.1 2003/04/14 15:45:54 vincentdarley Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -673,6 +673,11 @@ test fCmd-8.2 {FileBasename: basename of ~user: argc == 1 && *path == ~} \
{unixOnly notRoot} {
file tail ~$user
} "$user"
+test fCmd-8.3 {file copy and path translation: ensure correct error} {
+ list [catch {file copy ~ [file join this file doesnt exist]} res] $res
+} [list 1 \
+ "error copying \"~\" to \"[file join this file doesnt exist]\":\
+ no such file or directory"]
test fCmd-9.1 {file rename: comprehensive: EACCES} {unixOnly notRoot} {
cleanup
diff --git a/tests/ioUtil.test b/tests/ioUtil.test
index 812e3e4..5b0a79e 100644
--- a/tests/ioUtil.test
+++ b/tests/ioUtil.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: ioUtil.test,v 1.13 2002/07/18 09:40:24 vincentdarley Exp $
+# RCS: @(#) $Id: ioUtil.test,v 1.13.2.1 2003/04/14 15:45:57 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -113,14 +113,14 @@ test ioUtil-1.8 {TclStatDeleteProc: Verify that all procs have been deleted.} {t
eval $unsetScript
-test ioUtil-1.1 {TclAccess: Check that none of the test procs are there.} {
+test ioUtil-1.9 {TclAccess: Check that none of the test procs are there.} {
catch {file exists testAccess1%.fil} err1
catch {file exists testAccess2%.fil} err2
catch {file exists testAccess3%.fil} err3
list $err1 $err2 $err3
} {0 0 0}
-test ioUtil-1.2 {TclAccessInsertProc: Insert the 3 test TclAccess_ procedures.} {testaccessproc} {
+test ioUtil-1.10 {TclAccessInsertProc: Insert the 3 test TclAccess_ procedures.} {testaccessproc} {
catch {testaccessproc insert TclpAccess} err1
testaccessproc insert TestAccessProc1
testaccessproc insert TestAccessProc2
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test
index ca707a4..8f47c62 100644
--- a/tests/unixFCmd.test
+++ b/tests/unixFCmd.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unixFCmd.test,v 1.17 2003/01/25 00:16:39 hobbs Exp $
+# RCS: @(#) $Id: unixFCmd.test,v 1.17.2.1 2003/04/14 15:45:57 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -285,7 +285,7 @@ test unixFCmd-17.3 {SetPermissionsAttribute} {unixOnly notRoot} {
list [catch {file attributes foo.test -permissions foo} msg] $msg \
[file delete -force -- foo.test]
} {1 {unknown permission string format "foo"} {}}
-test unixFCmd-17.3 {SetPermissionsAttribute} {unixOnly notRoot} {
+test unixFCmd-17.4 {SetPermissionsAttribute} {unixOnly notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -permissions ---rwx} msg] $msg \
@@ -300,14 +300,14 @@ proc permcheck {testnum permstr expected} {
file attributes foo.test -permissions
} $expected
}
-permcheck unixFCmd-17.4 rwxrwxrwx 00777
-permcheck unixFCmd-17.5 r--r---w- 00442
-permcheck unixFCmd-17.6 0 00000
-permcheck unixFCmd-17.7 u+rwx,g+r 00740
-permcheck unixFCmd-17.8 u-w 00540
-permcheck unixFCmd-17.9 o+rwx 00547
-permcheck unixFCmd-17.10 --x--x--x 00111
-permcheck unixFCmd-17.11 a+rwx 00777
+permcheck unixFCmd-17.5 rwxrwxrwx 00777
+permcheck unixFCmd-17.6 r--r---w- 00442
+permcheck unixFCmd-17.7 0 00000
+permcheck unixFCmd-17.8 u+rwx,g+r 00740
+permcheck unixFCmd-17.9 u-w 00540
+permcheck unixFCmd-17.10 o+rwx 00547
+permcheck unixFCmd-17.11 --x--x--x 00111
+permcheck unixFCmd-17.12 a+rwx 00777
file delete -force -- foo.test
test unixFCmd-18.1 {Unix pwd} {nonPortable unixOnly notRoot} {
diff --git a/tests/winFile.test b/tests/winFile.test
index 4b04096..95816ff 100644
--- a/tests/winFile.test
+++ b/tests/winFile.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: winFile.test,v 1.9 2002/07/18 16:36:56 vincentdarley Exp $
+# RCS: @(#) $Id: winFile.test,v 1.9.2.1 2003/04/14 15:45:58 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -25,7 +25,7 @@ test winFile-1.2 {TclpGetUserHome} {pcOnly nt nonPortable} {
catch {glob ~administrator}
} {0}
-test winFile-1.2 {TclpGetUserHome} {pcOnly 95} {
+test winFile-1.3 {TclpGetUserHome} {pcOnly 95} {
# Find some user in system.ini and then see if they have a home.
set f [open $::env(windir)/system.ini]
@@ -44,7 +44,7 @@ test winFile-1.2 {TclpGetUserHome} {pcOnly 95} {
close $f
set x
} {0}
-test winFile-1.3 {TclpGetUserHome} {pcOnly nt nonPortable} {
+test winFile-1.4 {TclpGetUserHome} {pcOnly nt nonPortable} {
catch {glob ~stanton@workgroup}
} {0}