summaryrefslogtreecommitdiffstats
path: root/tests/zipfs.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-03-14 15:26:44 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-03-14 15:26:44 (GMT)
commit58fb98d8a916de0e1d9dc34c76262d80ab853927 (patch)
tree04021a4e001b985a104d1f98d54a1be7e2fc31a4 /tests/zipfs.test
parentd0443e229f2951cd4cbc6f94dbfa6f89be95f1b5 (diff)
downloadtcl-58fb98d8a916de0e1d9dc34c76262d80ab853927.zip
tcl-58fb98d8a916de0e1d9dc34c76262d80ab853927.tar.gz
tcl-58fb98d8a916de0e1d9dc34c76262d80ab853927.tar.bz2
More on making tclZipfs.c comprehensible. Refactoring to the rescue!
Diffstat (limited to 'tests/zipfs.test')
-rw-r--r--tests/zipfs.test16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/zipfs.test b/tests/zipfs.test
index 36fc6d6..eba2a1e 100644
--- a/tests/zipfs.test
+++ b/tests/zipfs.test
@@ -381,9 +381,21 @@ test zipfs-4.5 {zipfs lmkimg: making image from mounted} -constraints zipfs -set
removeFile $addFile
} -result {//zipfs://ziptest/test/add.tcl //zipfs://ziptest/test/ok.tcl}
-test zipfs-5.1 {zipfs mount_data: short data} -body {
+test zipfs-5.1 {zipfs mount_data: short data} -constraints zipfs -body {
zipfs mount_data gorp {}
-} -constraints zipfs -returnCodes error -result {bad zip data}
+} -returnCodes error -result {bad zip data}
+test zipfs-5.2 {zipfs mount_data: short data} -constraints zipfs -body {
+ zipfs mount_data gorp gorpGORPgorp
+} -returnCodes error -result {bad zip data}
+test zipfs-5.3 {zipfs mount_data: short data} -constraints zipfs -body {
+ set data PK\x03\x04.....................................
+ append data PK\x01\x02.....................................
+ append data PK\x05\x06.....................................
+ zipfs mount_data gorp $data
+} -returnCodes error -result {bad zip data}
+test zipfs-5.4 {zipfs mount_data: bad arg count} -constraints zipfs -body {
+ zipfs mount_data gorp {} foobar
+} -returnCodes error -result {wrong # args: should be "zipfs mount_data ?mountpoint? ?data?"}
::tcltest::cleanupTests
return