summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ioUtil.test104
1 files changed, 52 insertions, 52 deletions
diff --git a/tests/ioUtil.test b/tests/ioUtil.test
index f7a2999..ad7ec74 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.
#
-# SCCS: %Z% $Id: ioUtil.test,v 1.3 1998/07/28 11:09:15 hershey Exp $
+# SCCS: %Z% $Id: ioUtil.test,v 1.4 1998/08/07 12:02:42 suresh Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -55,7 +55,7 @@ test stat-1.4 {TclStatDeleteProc: "TclpStat" function should not be deletedable.
test stat-1.5 {TclStatDeleteProc: Delete the 2nd TclStat procedure.} {
# Delete the 2nd procedure and test that it longer exists but that
# the others do actually return a result.
-
+
teststatproc delete TestStatProc2
file stat testStat1%.fil testStat1
catch {file stat testStat2%.fil testStat2} err3
@@ -69,7 +69,7 @@ eval $unsetScript
test stat-1.6 {TclStatDeleteProc: Delete the 1st TclStat procedure.} {
# Next delete the 1st procedure and test that only the 3rd procedure
# is the only one that exists.
-
+
teststatproc delete TestStatProc1
catch {file stat testStat1%.fil testStat1} err4
catch {file stat testStat2%.fil testStat2} err5
@@ -83,7 +83,7 @@ eval $unsetScript
test stat-1.7 {TclStatDeleteProc: Delete the 3rd procedure & verify all are gone.} {
# Finally delete the 3rd procedure and check that none of the
# procedures exist.
-
+
teststatproc delete TestStatProc3
catch {file stat testStat1%.fil testStat1} err6
catch {file stat testStat2%.fil testStat2} err7
@@ -97,7 +97,7 @@ eval $unsetScript
test stat-1.8 {TclStatDeleteProc: Verify that all procs have been deleted.} {
# Attempt to delete all the Stat procs. again to ensure they no longer
# exist and an error is returned.
-
+
catch {teststatproc delete TestStatProc1} err9
catch {teststatproc delete TestStatProc2} err10
catch {teststatproc delete TestStatProc3} err11
@@ -107,8 +107,8 @@ test stat-1.8 {TclStatDeleteProc: Verify that all procs have been deleted.} {
}
eval $unsetScript
-
-
+
+
test access-1.1 {TclAccess: Check that none of the test procs are there.} {
catch {file exists testAccess1%.fil} err1
catch {file exists testAccess2%.fil} err2
@@ -128,8 +128,8 @@ test access-1.2 {TclAccessInsertProc: Insert the 3 test TclAccess_ procedures.}
set err1
} {bad arg "insert": must be TestAccessProc1, TestAccessProc2, or TestAccessProc3}
-test access-1.3 {TclAccess: Use "file access ?" to invoke each procedure.} {
- list \
+test access-1.3 {TclAccess: Use "file access ?" to invoke each procedure.} {
+ list \
[file exists testAccess2%.fil] \
[file exists testAccess1%.fil] \
[file exists testAccess3%.fil]
@@ -143,7 +143,7 @@ test access-1.4 {TclAccessDeleteProc: "TclpAccess" function should not be delete
test accesst-1.5 {TclAccessDeleteProc: Delete the 2nd TclAccess procedure.} {
# Delete the 2nd procedure and test that it longer exists but that
# the others do actually return a result.
-
+
testaccessproc delete TestAccessProc2
set res1 [file exists testAccess1%.fil]
catch {file exists testAccess2%.fil} err3
@@ -155,7 +155,7 @@ test accesst-1.5 {TclAccessDeleteProc: Delete the 2nd TclAccess procedure.} {
test access-1.6 {TclAccessDeleteProc: Delete the 1st TclAccess procedure.} {
# Next delete the 1st procedure and test that only the 3rd procedure
# is the only one that exists.
-
+
testaccessproc delete TestAccessProc1
catch {file exists testAccess1%.fil} err4
catch {file exists testAccess2%.fil} err5
@@ -167,7 +167,7 @@ test access-1.6 {TclAccessDeleteProc: Delete the 1st TclAccess procedure.} {
test access-1.7 {TclAccessDeleteProc: Delete the 3rd procedure & verify all are gone.} {
# Finally delete the 3rd procedure and check that none of the
# procedures exist.
-
+
testaccessproc delete TestAccessProc3
catch {file exists testAccess1%.fil} err6
catch {file exists testAccess2%.fil} err7
@@ -179,15 +179,15 @@ test access-1.7 {TclAccessDeleteProc: Delete the 3rd procedure & verify all are
test access-1.8 {TclAccessDeleteProc: Verify that all procs have been deleted.} {
# Attempt to delete all the Access procs. again to ensure they no longer
# exist and an error is returned.
-
+
catch {testaccessproc delete TestAccessProc1} err9
catch {testaccessproc delete TestAccessProc2} err10
catch {testaccessproc delete TestAccessProc3} err11
list $err9 $err10 $err11
-} {{"TestAccessProc1": could not be deleteed} {"TestAccessProc2": could not be deleteed} {"TestAccessProc3": could not be deleteed}}
+} {{"TestAccessProc1": could not be deleteed} {"TestAccessProc2": could not be deleteed} {"TestAccessProc3": could not be deleteed}}
}
-
+
test openfilechannel-1.1 {TclOpenFileChannel: Check that none of the test procs are there.} {
catch {file exists __testOpenFileChannel1%__.fil} err1
catch {file exists __testOpenFileChannel2%__.fil} err2
@@ -210,22 +210,22 @@ test openfilechannel-1.2 {TclOpenFileChannelInsertProc: Insert the 3 test TclOpe
set err1
} {bad arg "insert": must be TestOpenFileChannelProc1, TestOpenFileChannelProc2, or TestOpenFileChannelProc3}
-test openfilechannel-1.3 {TclOpenFileChannel: Use "file openfilechannel ?" to invoke each procedure.} {
- close [open __testOpenFileChannel1%__.fil w]
- close [open __testOpenFileChannel2%__.fil w]
- close [open __testOpenFileChannel3%__.fil w]
-
- catch {
+test openfilechannel-1.3 {TclOpenFileChannel: Use "file openfilechannel ?" to invoke each procedure.} {
+ close [open __testOpenFileChannel1%__.fil w]
+ close [open __testOpenFileChannel2%__.fil w]
+ close [open __testOpenFileChannel3%__.fil w]
+
+ catch {
close [open testOpenFileChannel1%.fil r]
close [open testOpenFileChannel2%.fil r]
- close [open testOpenFileChannel3%.fil r]
- } err
-
- file delete __testOpenFileChannel1%__.fil
- file delete __testOpenFileChannel2%__.fil
- file delete __testOpenFileChannel3%__.fil
-
- set err
+ close [open testOpenFileChannel3%.fil r]
+ } err
+
+ file delete __testOpenFileChannel1%__.fil
+ file delete __testOpenFileChannel2%__.fil
+ file delete __testOpenFileChannel3%__.fil
+
+ set err
} {}
test openfilechannel-1.4 {TclOpenFileChannelDeleteProc: "TclpOpenFileChannel" function should not be deletedable.} {
@@ -236,20 +236,20 @@ test openfilechannel-1.4 {TclOpenFileChannelDeleteProc: "TclpOpenFileChannel" fu
test openfilechannelt-1.5 {TclOpenFileChannelDeleteProc: Delete the 2nd TclOpenFileChannel procedure.} {
# Delete the 2nd procedure and test that it longer exists but that
# the others do actually return a result.
-
+
testopenfilechannelproc delete TestOpenFileChannelProc2
-
- close [open __testOpenFileChannel1%__.fil w]
- close [open __testOpenFileChannel3%__.fil w]
-
- catch {
+
+ close [open __testOpenFileChannel1%__.fil w]
+ close [open __testOpenFileChannel3%__.fil w]
+
+ catch {
close [open testOpenFileChannel1%.fil r]
catch {close [open testOpenFileChannel2%.fil r]}
- close [open testOpenFileChannel3%.fil r]
- } err3
+ close [open testOpenFileChannel3%.fil r]
+ } err3
- file delete __testOpenFileChannel1%__.fil
- file delete __testOpenFileChannel3%__.fil
+ file delete __testOpenFileChannel1%__.fil
+ file delete __testOpenFileChannel3%__.fil
set err3
} {}
@@ -257,18 +257,18 @@ test openfilechannelt-1.5 {TclOpenFileChannelDeleteProc: Delete the 2nd TclOpenF
test openfilechannel-1.6 {TclOpenFileChannelDeleteProc: Delete the 1st TclOpenFileChannel procedure.} {
# Next delete the 1st procedure and test that only the 3rd procedure
# is the only one that exists.
-
+
testopenfilechannelproc delete TestOpenFileChannelProc1
- close [open __testOpenFileChannel3%__.fil w]
-
- catch {
+ close [open __testOpenFileChannel3%__.fil w]
+
+ catch {
catch {close [open testOpenFileChannel1%.fil r]}
catch {close [open testOpenFileChannel2%.fil r]}
- close [open testOpenFileChannel3%.fil r]
- } err4
+ close [open testOpenFileChannel3%.fil r]
+ } err4
- file delete __testOpenFileChannel3%__.fil
+ file delete __testOpenFileChannel3%__.fil
set err4
} {}
@@ -276,13 +276,13 @@ test openfilechannel-1.6 {TclOpenFileChannelDeleteProc: Delete the 1st TclOpenFi
test openfilechannel-1.7 {TclOpenFileChannelDeleteProc: Delete the 3rd procedure & verify all are gone.} {
# Finally delete the 3rd procedure and check that none of the
# procedures exist.
-
+
testopenfilechannelproc delete TestOpenFileChannelProc3
- catch {
+ catch {
catch [open testOpenFileChannel1%.fil r]
catch [open testOpenFileChannel2%.fil r]
- catch [open testOpenFileChannel3%.fil r]
- } err5
+ catch [open testOpenFileChannel3%.fil r]
+ } err5
set err5
} {1}
@@ -290,11 +290,11 @@ test openfilechannel-1.7 {TclOpenFileChannelDeleteProc: Delete the 3rd procedure
test openfilechannel-1.8 {TclOpenFileChannelDeleteProc: Verify that all procs have been deleted.} {
# Attempt to delete all the OpenFileChannel procs. again to ensure they no longer
# exist and an error is returned.
-
+
catch {testopenfilechannelproc delete TestOpenFileChannelProc1} err9
catch {testopenfilechannelproc delete TestOpenFileChannelProc2} err10
catch {testopenfilechannelproc delete TestOpenFileChannelProc3} err11
list $err9 $err10 $err11
-} {{"TestOpenFileChannelProc1": could not be deleteed} {"TestOpenFileChannelProc2": could not be deleteed} {"TestOpenFileChannelProc3": could not be deleteed}}
+} {{"TestOpenFileChannelProc1": could not be deleteed} {"TestOpenFileChannelProc2": could not be deleteed} {"TestOpenFileChannelProc3": could not be deleteed}}
}