diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-09-25 15:17:48 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-09-25 15:17:48 (GMT) |
commit | ea11b48037fc6e1e390196ddeba50a7e33991f57 (patch) | |
tree | e0b0604a374579d4b2684cc674af171d267f5156 /tests | |
parent | 434036ad668001c000f0edd307a0855f1bf513f9 (diff) | |
download | tcl-ea11b48037fc6e1e390196ddeba50a7e33991f57.zip tcl-ea11b48037fc6e1e390196ddeba50a7e33991f57.tar.gz tcl-ea11b48037fc6e1e390196ddeba50a7e33991f57.tar.bz2 |
zipfs attribute tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/zipfs.test | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/zipfs.test b/tests/zipfs.test index 200a8a1..f661e50 100644 --- a/tests/zipfs.test +++ b/tests/zipfs.test @@ -1318,7 +1318,26 @@ namespace eval test_ns_zipfs { testzipfsglob mountpoint $defaultMountPoint [file join [zipfs root] *] \ [list $defaultMountPoint] {} -constraints !zipfslib - # TODO tests for compress and save, + with password + # + # file attributes + proc testzipfsfileattr [list id path result [list mountpoint $defaultMountPoint] args] { + test zipfs-file-attrs-$id "zipfs file attrs $id" -setup { + mount [zippath test.zip] $mountpoint + } -cleanup cleanup -body { + lsort -stride 2 [file attributes $path] + } -result $result {*}$args + } + testzipfsfileattr noent [file join $defaultMountPoint nosuchfile] \ + {file not found: no such file or directory} $defaultMountPoint -returnCodes error + testzipfsfileattr file [file join $defaultMountPoint test] \ + [list -archive [zippath test.zip] -compsize 5 -crc [expr 0x3BB935C6] -mount $defaultMountPoint -offset 55 -permissions 0o555 -uncompsize 5] + testzipfsfileattr dir [file join $defaultMountPoint testdir] \ + [list -archive [zippath test.zip] -compsize 0 -crc 0 -mount $defaultMountPoint -offset 119 -permissions 0o555 -uncompsize 0] + testzipfsfileattr root [zipfs root] {} {} -constraints bug-4af110a6a1 + testzipfsfileattr mountpoint $defaultMountPoint \ + [list -archive [zippath test.zip] -compsize 0 -crc 0 -mount $defaultMountPoint -offset 0 -permissions 0o555 -uncompsize 0] + testzipfsfileattr mezzo [file join $defaultMountPoint a b] {} [file join $defaultMountPoint a b c] -constraints bug-4af110a6a1 + # # TODO - file copy, file rename etc. |