summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/test_read_format_zip.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge r335,653,676 from libarchive.googlecode.com: Instead ofkientzle2009-03-071-6/+12
| | | | | | | | | conditioning tests on HAVE_ZLIB, etc, just ask libarchive for the service and handle the failure coming back from libarchive. This gives us better test coverage of common client usage where clients simply try to use libarchive services and handle the errors coming back instead of trying to second-guess which libarchive services are compiled in.
* Merge r294:337,r348:350 from libarchive.googlecode.com: A lotkientzle2009-03-031-1/+5
| | | | of work to make libarchive work on Windows.
* If we don't know the file size, leave the file size unset.kientzle2008-10-211-1/+8
| | | | | | | | | | | | If it's not a regular file, don't return any data, even if the size is unknown. Update the Zip test with a hand-tweaked Zip archive that has a directory (with length-at-end set), a regular file without length-at-end set, and a regular file with length-at-end set and a bad CRC. Update the test code to verify that the file size is unset for the regular file with length-at-end. MFC after: 7 days
* Style: Use ARCHIVE_VERSION_NUMBER to conditionalize tests onkientzle2008-09-011-3/+3
| | | | | the particular libarchive version being tested instead of the deprecated ARCHIVE_API_VERSION and ARCHIVE_VERSION_STAMP macros.
* Explain why two apparently-identical archive_read_data() callskientzle2008-08-101-0/+2
| | | | really should have different return values.
* Add regression test for CRC32 check. The test file has been modified todes2008-06-261-2/+3
| | | | | | include an invalid checksum for file2. Approved by: kientzle
* Split out the reference zip file for ease of maintenance.kientzle2008-06-261-19/+3
|
* Extensive improvements to the libarchive_test test program thatkientzle2008-01-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | exercises and verifies the libarchive APIs: * Improved error reporting; hexdumps are now provided for many file/memory content differences. * Overall status more clearly counts "tests" and "assertions" * Reference files can now be stored on disk instead of having to be compiled into the test program itself. A couple of tests have been converted to this more natural structure. * Several memory leaks corrected so that leaks within libarchive itself can be more easily detected and diagnosed. * New test: GNU tar compatibility * New test: Zip compatibility * New test: Zero-byte writes to a compressed archive entry * New test: archive_entry_strmode() format verification * New test: mtree reader * New test: write/read of large (2G - 1TB) entries to tar archives (thanks to recent performance work, this test only requires a few seconds) * New test: detailed format verification of cpio odc and newc writers * Many minor additions/improvements to existing tests as well.
* libarchive 2.2.3kientzle2007-05-291-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "compression_program" support uses an external program * Portability: no longer uses "struct stat" as a primary data interchange structure internally * Part of the above: refactor archive_entry to separate out copy_stat() and stat() functions * More complete tests for archive_entry * Finish archive_entry_clone() * Isolate major()/minor()/makedev() in archive_entry; remove these from everywhere else. * Bug fix: properly handle decompression look-ahead at end-of-data * Bug fixes to 'ar' support * Fix memory leak in ZIP reader * Portability: better timegm() emulation in iso9660 reader * New write_disk flags to suppress auto dir creation and not overwrite newer files (for future cpio front-end) * Simplify trailing-'/' fixup when writing tar and pax * Test enhancements: fix various compiler warnings, improve portability, add lots of new tests. * Documentation: document new functions, first draft of libarchive_internals.3 MFC after: 14 days Thanks to: Joerg Sonnenberger (compression_program) Thanks to: Kai Wang (ar) Thanks to: Colin Percival (many small fixes) Thanks to: Many others who sent me various patches and problem reports.
* libarchive 2.0kientzle2007-03-031-0/+54
* libarchive_test program exercises many of the core features * Refactored old "read_extract" into new "archive_write_disk", which uses archive_write methods to put entries onto disk. In particular, you can now use archive_write_disk to create objects on disk without having an archive available. * Pushed some security checks from bsdtar down into libarchive, where they can be better optimized. * Rearchitected the logic for creating objects on disk to reduce the number of system calls. Several common cases now use a minimum number of system calls. * Virtualized some internal interfaces to provide a clearer separation of read and write handling and make it simpler to override key methods. * New "empty" format reader. * Corrected return types (this ABI breakage required the "2.0" version bump) * Many bug fixes.
OpenPOWER on IntegriCloud