libarchive/test/test_read_format_cab_filename_cp932.cab.uu \
libarchive/test/test_read_format_cab_lzx_oob.cab.uu \
libarchive/test/test_read_format_cab_skip_malformed.cab.uu \
+ libarchive/test/test_read_format_cpio_afio_header.part1.cpio.uu \
+ libarchive/test/test_read_format_cpio_afio_header.part2.cpio.uu \
libarchive/test/test_read_format_cpio_bin_be.cpio.uu \
libarchive/test/test_read_format_cpio_bin_le.cpio.uu \
libarchive/test/test_read_format_cpio_filename_cp866.cpio.uu \
assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_AFIO_LARGE);
archive_read_free(a);
}
+
+DEFINE_TEST(test_read_format_cpio_afio_header)
+{
+ const char *reffiles[] =
+ {
+ "test_read_format_cpio_afio_header.part1.cpio",
+ "test_read_format_cpio_afio_header.part2.cpio",
+ NULL
+ };
+ struct archive_entry *ae;
+ struct archive *a;
+
+ extract_reference_files(reffiles);
+ assert((a = archive_read_new()) != NULL);
+ assertA(0 == archive_read_support_format_cpio(a));
+ assertA(0 == archive_read_open_filenames(a, reffiles, 10240));
+
+ /* File "a" */
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("a", archive_entry_pathname(ae));
+
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
--- /dev/null
+begin 644 test_read_format_cpio_afio_header.part1.cpio
+M,#<P-S(W,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P;3`P,#`P,#`P,#`P,#`P
+?,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,```
+`
+end
--- /dev/null
+begin 644 test_read_format_cpio_afio_header.part2.cpio
+I,#`P,#`P,#`P;C`P,#$P,#`P,#`P,',P,#`P,#`P,#`P,#`P,#`P.F$`
+`
+end