summaryrefslogtreecommitdiffstats
path: root/tests/zipfs.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-10-04 12:57:08 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-10-04 12:57:08 (GMT)
commit36db68b9d446670328287e35e8959adf3f555bc0 (patch)
tree56c27c7a9e7c722a7e9443284ae70ef5fad90d48 /tests/zipfs.test
parent0dc647a301ee262934691ac630a1f16f1891ea12 (diff)
downloadtcl-36db68b9d446670328287e35e8959adf3f555bc0.zip
tcl-36db68b9d446670328287e35e8959adf3f555bc0.tar.gz
tcl-36db68b9d446670328287e35e8959adf3f555bc0.tar.bz2
Update tests for zipfs append.
Diffstat (limited to 'tests/zipfs.test')
-rw-r--r--tests/zipfs.test12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/zipfs.test b/tests/zipfs.test
index d652f05..046e3b5 100644
--- a/tests/zipfs.test
+++ b/tests/zipfs.test
@@ -1007,7 +1007,9 @@ namespace eval test_ns_zipfs {
set body {
set fd [open $path $mode]
fconfigure $fd -translation binary
- puts -nonewline $fd "xyz"
+ puts -nonewline $fd XYZ
+ seek $fd 0
+ puts -nonewline $fd xyz
close $fd
set fd [open $path]
fconfigure $fd -translation binary
@@ -1045,10 +1047,10 @@ namespace eval test_ns_zipfs {
testzipfswrite deflate-w testdeflated2.zip "xyz" abac-repeat.txt w
testzipfswrite store-w+ teststored.zip "xyz" abac-repeat.txt w+
testzipfswrite deflate-w+ testdeflated2.zip "xyz" abac-repeat.txt w+
- testzipfswrite stored-a teststored.zip "append mode not supported: permission denied" abac-repeat.txt a -returnCodes error
- testzipfswrite deflate-a testdeflated2.zip "append mode not supported: permission denied" abac-repeat.txt a -returnCodes error
- testzipfswrite store-a+ teststored.zip "aaaaaaaaaaaaaa\nbbbbbbbbbbbbbb\naaaaaaaaaaaaaa\ncccccccccccccc\nxyz" abac-repeat.txt a+
- testzipfswrite deflate-a+ testdeflated2.zip "aaaaaaaaaaaaaa\nbbbbbbbbbbbbbb\naaaaaaaaaaaaaa\ncccccccccccccc\nxyz" abac-repeat.txt a+
+ testzipfswrite stored-a teststored.zip "aaaaaaaaaaaaaa\nbbbbbbbbbbbbbb\naaaaaaaaaaaaaa\ncccccccccccccc\nXYZxyz" abac-repeat.txt a
+ testzipfswrite deflate-a testdeflated2.zip "aaaaaaaaaaaaaa\nbbbbbbbbbbbbbb\naaaaaaaaaaaaaa\ncccccccccccccc\nXYZxyz" abac-repeat.txt a
+ testzipfswrite store-a+ teststored.zip "xyzaaaaaaaaaaa\nbbbbbbbbbbbbbb\naaaaaaaaaaaaaa\ncccccccccccccc\nXYZ" abac-repeat.txt a+
+ testzipfswrite deflate-a+ testdeflated2.zip "xyzaaaaaaaaaaa\nbbbbbbbbbbbbbb\naaaaaaaaaaaaaa\ncccccccccccccc\nXYZ" abac-repeat.txt a+
testzipfswrite bug-23dd83ce7c-w empty.zip "xyz" empty.txt w
test zipfs-write-unreadable "Reads not allowed on file opened for write" -setup {