summaryrefslogtreecommitdiffstats
path: root/tests/zipfs.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-09-28 17:11:39 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-09-28 17:11:39 (GMT)
commit9fb03c8b99518f5210907247a9bdc5c397516012 (patch)
tree26ff9f87e465853c992613ce12bb63adce313ffe /tests/zipfs.test
parent1cebc18c7595887b559fc17235acc0315299c9eb (diff)
downloadtcl-9fb03c8b99518f5210907247a9bdc5c397516012.zip
tcl-9fb03c8b99518f5210907247a9bdc5c397516012.tar.gz
tcl-9fb03c8b99518f5210907247a9bdc5c397516012.tar.bz2
Progress on [6d2ef441cc]
Diffstat (limited to 'tests/zipfs.test')
-rw-r--r--tests/zipfs.test26
1 files changed, 19 insertions, 7 deletions
diff --git a/tests/zipfs.test b/tests/zipfs.test
index f979f57..e7f8de9 100644
--- a/tests/zipfs.test
+++ b/tests/zipfs.test
@@ -1246,7 +1246,7 @@ namespace eval test_ns_zipfs {
fconfigure $fd -translation binary
read $fd
}
- test zipfs-password-$id "zipfs write $id" -setup {
+ test zipfs-password-write-$id "zipfs write $id" -setup {
unset -nocomplain fd
if {$password ne ""} {
zipfs mount $zippath $defaultMountPoint $password
@@ -1261,12 +1261,24 @@ namespace eval test_ns_zipfs {
cleanup
} -body $body -result $result {*}$args
}
- testpasswordw write-w test-password.zip cipher.bin password w xyz
- testpasswordw write-badpass-w test-password.zip cipher.bin badpass w {invalid password} -returnCodes error
- testpasswordw write-w+ test-password.zip cipher.bin password w xyz
- testpasswordw write-badpass-w+ test-password.zip cipher.bin badpass w {invalid password} -returnCodes error
- testpasswordw write-a+ test-password.zip cipher.bin password a+ ciphertextxyz
- testpasswordw write-badpass-a+ test-password.zip cipher.bin badpass a+ {invalid password} -returnCodes error
+ # NOTE: test-password.zip is the DOS time based encryption header validity check (infozip style)
+ # test-password2.zip is the CRC based encryption header validity check (pkware style)
+ testpasswordw cipher-w-1 test-password.zip cipher.bin password w xyz
+ testpasswordw cipher-w-2 test-password2.zip cipher.bin password w xyz
+ testpasswordw cipher-deflate-w test-password2.zip cipher-deflate.bin password w xyz
+ testpasswordw cipher-badpass-w-1 test-password.zip cipher.bin badpass w {invalid password} -returnCodes error
+ testpasswordw cipher-badpass-w-2 test-password2.zip cipher.bin badpass w {invalid password} -returnCodes error
+ testpasswordw cipher-badpass-deflate-w test-password2.zip cipher-deflate.bin badpass w {invalid password} -returnCodes error
+
+ testpasswordw cipher-w+ test-password.zip cipher.bin password w xyz
+ testpasswordw cipher-deflate-w+ test-password2.zip cipher-deflate.bin password w xyz
+ testpasswordw cipher-badpass-w+ test-password.zip cipher.bin badpass w {invalid password} -returnCodes error
+ testpasswordw cipher-badpass-deflate-w+ test-password2.zip cipher-deflate.bin badpass w {invalid password} -returnCodes error
+
+ testpasswordw cipher-a+ test-password.zip cipher.bin password a+ ciphertextxyz
+ testpasswordw cipher-deflate-a+ test-password2.zip cipher-deflate.bin password a+ [lseq 100]xyz
+ testpasswordw cipher-badpass-a+ test-password.zip cipher.bin badpass a+ {invalid password} -returnCodes error
+ testpasswordw cipher-badpass-deflate-a+ test-password2.zip cipher-deflate.bin badpass a+ {invalid password} -returnCodes error
#
# CRC errors