Chris Muller uploaded a new version of Compression to project The Trunk:
http://source.squeak.org/trunk/Compression-cmm.24.mcz==================== Summary ====================
Name: Compression-cmm.24
Author: cmm
Time: 16 September 2010, 6:29:29.033 pm
UUID: 3b7451e6-57a1-4365-aa83-b1ad1b5f6996
Ancestors: Compression-ar.23
Added test for zipping a directory with a file using relative names.
=============== Diff against Compression-ar.23 ===============
Item was added:
+ ----- Method: ZipArchiveTests>>testCreateWithRelativeNames (in category 'tests') -----
+ testCreateWithRelativeNames
+ "Test creating a zip with a relative tree of files, so that the tree will
+ be created whereever the ."
+ | subdir zip |
+ subdir := FileDirectory default / '_test-zip-dir'.
+ self deny: subdir exists.
+ subdir assureExistence.
+ [ subdir
+ fileNamed: '_test-zip-file'
+ do: [ : stream | stream nextPutAll: 'file contents' ].
+ zip := ZipArchive new.
+ zip
+ addDirectory: subdir fullName
+ as: subdir localName.
+ zip
+ addFile: (subdir fullNameFor: '_test-zip-file')
+ as: '_test-zip-dir' , FileDirectory slash , '_test-zip-file'.
+ zip writeToFileNamed: (FileDirectory default fullNameFor: '_test.zip') ]
+ ensure:
+ [ subdir ifNotNil: [ subdir recursiveDelete ].
+ FileDirectory default deleteFileNamed: '_test.zip' ]!