source: trunk/abcl/test/lisp/abcl/zip.lisp

Last change on this file was 13336, checked in by Mark Evenson, 13 years ago

Create form of SYSTEM:ZIP that uses a hashtable to map files to entries.

SYSTEM:ZIP PATH HASHTABLE now creates entries in a zipfile at PATH
whose entries are the contents of for each (KEY VALUE) in HASHTABLE
for which KEY refers to an object on the filesystem and VALUE is the
location in the zip archive.

Introduce Java interfaces in org.armedbear.lisp.protocol to start
encapsulating behavior of Java system. By retroactively adding
markers to the object hierarchy rooted on LispObject we gain the
ability to have our JVM code optionally work with interfaces but we
leave the core dispatch functions alone for speed.

File size: 765 bytes
Line 
1(in-package #:abcl.test.lisp)
2
3(deftest zip.1 
4    (let ((mapping (make-hash-table :test 'equal)))
5      (loop :for (key value) 
6         :in `(("/etc/hosts" "/etc/hosts")
7               ("/etc/group" "groups")               
8               ("/etc/resolv.conf" "/opt/etc/resolv.conf"))
9         :doing 
10            (setf (gethash key mapping) value))
11      (values 
12       (system:zip #p"/var/tmp/foo.jar" mapping)
13       (not (probe-file "jar:file:/var/tmp/foo.jar!/etc/hosts"))
14       (not (probe-file "jar:file:/var/tmp/foo.jar!/groups"))
15       (not (probe-file "jar:file:/var/tmp/foo.jar!/opt/etc/resolv.conf"))))
16  #p"/var/tmp/foo.jar" nil nil nil)
17
18(eval-when (:load-toplevel)
19  (if (not (find :unix *features*))
20      (pushnew 'zip.1 *expected-failures*)))
Note: See TracBrowser for help on using the repository browser.