File: vfsZip.test

package info (click to toggle)
tclvfs 1.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,240 kB
  • ctags: 416
  • sloc: tcl: 3,670; xml: 2,882; sh: 2,833; ansic: 1,264; makefile: 58
file content (27 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Commands covered:  the 'zip' vfs.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001-2002 by Vince Darley.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest
    namespace import ::tcltest::*
}

package require vfs::zip

test vfsZip-1.1 {mount with error} {
    set f [file join [temporaryDirectory] vfszip.zip]
    close [open $f w]
    set res [catch {vfs::zip::Mount $f localmount} err]
    #lappend res $err
    lappend res [catch {file delete $f}]
    set res
} {1 0}