2 * Copyright (c) 2011-2012 Michihiro NAKAJIMA
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 __FBSDID("$FreeBSD$");
31 test_basic(const char *compression_type)
34 struct archive_entry *ae;
37 size_t buffsize = 1000;
40 buff = malloc(buffsize);
42 /* Create a new archive in memory. */
43 assert((a = archive_write_new()) != NULL);
44 assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_7zip(a));
45 if (compression_type != NULL &&
46 ARCHIVE_OK != archive_write_set_format_option(a, "7zip",
47 "compression", compression_type)) {
48 skipping("%s writing not fully supported on this platform",
50 assertEqualInt(ARCHIVE_OK, archive_write_free(a));
54 assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
55 assertEqualIntA(a, ARCHIVE_OK,
56 archive_write_open_memory(a, buff, buffsize, &used));
59 * Write an empty file to it.
61 assert((ae = archive_entry_new()) != NULL);
62 archive_entry_set_mtime(ae, 1, 10);
63 assertEqualInt(1, archive_entry_mtime(ae));
64 assertEqualInt(10, archive_entry_mtime_nsec(ae));
65 archive_entry_copy_pathname(ae, "empty");
66 assertEqualString("empty", archive_entry_pathname(ae));
67 archive_entry_set_mode(ae, AE_IFREG | 0755);
68 assertEqualInt((AE_IFREG | 0755), archive_entry_mode(ae));
70 assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
71 archive_entry_free(ae);
74 * Write another empty file to it.
76 assert((ae = archive_entry_new()) != NULL);
77 archive_entry_set_mtime(ae, 1, 10);
78 assertEqualInt(1, archive_entry_mtime(ae));
79 assertEqualInt(10, archive_entry_mtime_nsec(ae));
80 archive_entry_copy_pathname(ae, "empty2");
81 assertEqualString("empty2", archive_entry_pathname(ae));
82 archive_entry_set_mode(ae, AE_IFREG | 0444);
83 assertEqualInt((AE_IFREG | 0444), archive_entry_mode(ae));
85 assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
86 archive_entry_free(ae);
91 assert((ae = archive_entry_new()) != NULL);
92 archive_entry_set_mtime(ae, 1, 100);
93 assertEqualInt(1, archive_entry_mtime(ae));
94 assertEqualInt(100, archive_entry_mtime_nsec(ae));
95 archive_entry_copy_pathname(ae, "file");
96 assertEqualString("file", archive_entry_pathname(ae));
97 archive_entry_set_mode(ae, AE_IFREG | 0755);
98 assertEqualInt((AE_IFREG | 0755), archive_entry_mode(ae));
99 archive_entry_set_size(ae, 8);
101 assertEqualInt(0, archive_write_header(a, ae));
102 archive_entry_free(ae);
103 assertEqualInt(8, archive_write_data(a, "12345678", 9));
104 assertEqualInt(0, archive_write_data(a, "1", 1));
107 * Write another file to it.
109 assert((ae = archive_entry_new()) != NULL);
110 archive_entry_set_mtime(ae, 1, 10);
111 assertEqualInt(1, archive_entry_mtime(ae));
112 assertEqualInt(10, archive_entry_mtime_nsec(ae));
113 archive_entry_copy_pathname(ae, "file2");
114 assertEqualString("file2", archive_entry_pathname(ae));
115 archive_entry_set_mode(ae, AE_IFREG | 0755);
116 assertEqualInt((AE_IFREG | 0755), archive_entry_mode(ae));
117 archive_entry_set_size(ae, 4);
119 assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
120 archive_entry_free(ae);
121 assertEqualInt(4, archive_write_data(a, "1234", 5));
124 * Write a symbolic file to it.
126 assert((ae = archive_entry_new()) != NULL);
127 archive_entry_set_mtime(ae, 1, 10);
128 assertEqualInt(1, archive_entry_mtime(ae));
129 assertEqualInt(10, archive_entry_mtime_nsec(ae));
130 archive_entry_copy_pathname(ae, "symbolic");
131 archive_entry_copy_symlink(ae, "file1");
132 assertEqualString("symbolic", archive_entry_pathname(ae));
133 archive_entry_set_mode(ae, AE_IFLNK | 0755);
134 assertEqualInt((AE_IFLNK | 0755), archive_entry_mode(ae));
136 assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
137 archive_entry_free(ae);
140 * Write a directory to it.
142 assert((ae = archive_entry_new()) != NULL);
143 archive_entry_set_mtime(ae, 11, 100);
144 archive_entry_copy_pathname(ae, "dir");
145 archive_entry_set_mode(ae, AE_IFDIR | 0755);
146 archive_entry_set_size(ae, 512);
148 assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
149 failure("size should be zero so that applications know not to write");
150 assertEqualInt(0, archive_entry_size(ae));
151 archive_entry_free(ae);
152 assertEqualIntA(a, 0, archive_write_data(a, "12345678", 9));
155 * Write a sub directory to it.
157 assert((ae = archive_entry_new()) != NULL);
158 archive_entry_set_mtime(ae, 11, 200);
159 archive_entry_copy_pathname(ae, "dir/subdir");
160 archive_entry_set_mode(ae, AE_IFDIR | 0755);
161 archive_entry_set_size(ae, 512);
163 assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
164 failure("size should be zero so that applications know not to write");
165 assertEqualInt(0, archive_entry_size(ae));
166 archive_entry_free(ae);
167 assertEqualIntA(a, 0, archive_write_data(a, "12345678", 9));
170 * Write a sub sub-directory to it.
172 assert((ae = archive_entry_new()) != NULL);
173 archive_entry_set_mtime(ae, 11, 300);
174 archive_entry_copy_pathname(ae, "dir/subdir/subdir");
175 archive_entry_set_mode(ae, AE_IFDIR | 0755);
176 archive_entry_set_size(ae, 512);
178 assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
179 failure("size should be zero so that applications know not to write");
180 assertEqualInt(0, archive_entry_size(ae));
181 archive_entry_free(ae);
182 assertEqualIntA(a, 0, archive_write_data(a, "12345678", 9));
184 /* Close out the archive. */
185 assertEqualInt(ARCHIVE_OK, archive_write_close(a));
186 assertEqualInt(ARCHIVE_OK, archive_write_free(a));
188 /* Verify the initial header. */
189 assertEqualMem(buff, "\x37\x7a\xbc\xaf\x27\x1c\x00\x03", 8);
192 * Now, read the data back.
194 /* With the test memory reader -- seeking mode. */
195 assert((a = archive_read_new()) != NULL);
196 assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
197 assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
198 assertEqualIntA(a, ARCHIVE_OK, read_open_memory_seek(a, buff, used, 7));
201 * Read and verify first file.
203 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
204 assertEqualInt(1, archive_entry_mtime(ae));
205 assertEqualInt(100, archive_entry_mtime_nsec(ae));
206 assertEqualInt(0, archive_entry_atime(ae));
207 assertEqualInt(0, archive_entry_ctime(ae));
208 assertEqualString("file", archive_entry_pathname(ae));
209 assertEqualInt(AE_IFREG | 0755, archive_entry_mode(ae));
210 assertEqualInt(8, archive_entry_size(ae));
211 assertEqualIntA(a, 8,
212 archive_read_data(a, filedata, sizeof(filedata)));
213 assertEqualMem(filedata, "12345678", 8);
217 * Read the second file back.
219 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
220 assertEqualInt(1, archive_entry_mtime(ae));
221 assertEqualInt(0, archive_entry_mtime_nsec(ae));
222 assertEqualInt(0, archive_entry_atime(ae));
223 assertEqualInt(0, archive_entry_ctime(ae));
224 assertEqualString("file2", archive_entry_pathname(ae));
225 assertEqualInt(AE_IFREG | 0755, archive_entry_mode(ae));
226 assertEqualInt(4, archive_entry_size(ae));
227 assertEqualIntA(a, 4,
228 archive_read_data(a, filedata, sizeof(filedata)));
229 assertEqualMem(filedata, "1234", 4);
232 * Read and verify a symbolic file.
234 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
235 assertEqualInt(1, archive_entry_mtime(ae));
236 assertEqualInt(0, archive_entry_mtime_nsec(ae));
237 assertEqualInt(0, archive_entry_atime(ae));
238 assertEqualInt(0, archive_entry_ctime(ae));
239 assertEqualString("symbolic", archive_entry_pathname(ae));
240 assertEqualString("file1", archive_entry_symlink(ae));
241 assertEqualInt(AE_IFLNK | 0755, archive_entry_mode(ae));
242 assertEqualInt(0, archive_entry_size(ae));
245 * Read and verify an empty file.
247 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
248 assertEqualInt(1, archive_entry_mtime(ae));
249 assertEqualInt(0, archive_entry_mtime_nsec(ae));
250 assertEqualInt(0, archive_entry_atime(ae));
251 assertEqualInt(0, archive_entry_ctime(ae));
252 assertEqualString("empty", archive_entry_pathname(ae));
253 assertEqualInt(AE_IFREG | 0755, archive_entry_mode(ae));
254 assertEqualInt(0, archive_entry_size(ae));
257 * Read and verify an empty file.
259 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
260 assertEqualInt(1, archive_entry_mtime(ae));
261 assertEqualInt(0, archive_entry_mtime_nsec(ae));
262 assertEqualInt(0, archive_entry_atime(ae));
263 assertEqualInt(0, archive_entry_ctime(ae));
264 assertEqualString("empty2", archive_entry_pathname(ae));
265 assertEqualInt(AE_IFREG | 0444, archive_entry_mode(ae));
266 assertEqualInt(0, archive_entry_size(ae));
269 * Read the sub sub-dir entry back.
271 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
272 assertEqualInt(11, archive_entry_mtime(ae));
273 assertEqualInt(300, archive_entry_mtime_nsec(ae));
274 assertEqualInt(0, archive_entry_atime(ae));
275 assertEqualInt(0, archive_entry_ctime(ae));
276 assertEqualString("dir/subdir/subdir/", archive_entry_pathname(ae));
277 assertEqualInt(AE_IFDIR | 0755, archive_entry_mode(ae));
278 assertEqualInt(0, archive_entry_size(ae));
279 assertEqualIntA(a, 0, archive_read_data(a, filedata, 10));
282 * Read the sub dir entry back.
284 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
285 assertEqualInt(11, archive_entry_mtime(ae));
286 assertEqualInt(200, archive_entry_mtime_nsec(ae));
287 assertEqualInt(0, archive_entry_atime(ae));
288 assertEqualInt(0, archive_entry_ctime(ae));
289 assertEqualString("dir/subdir/", archive_entry_pathname(ae));
290 assertEqualInt(AE_IFDIR | 0755, archive_entry_mode(ae));
291 assertEqualInt(0, archive_entry_size(ae));
292 assertEqualIntA(a, 0, archive_read_data(a, filedata, 10));
295 * Read the dir entry back.
297 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
298 assertEqualInt(11, archive_entry_mtime(ae));
299 assertEqualInt(100, archive_entry_mtime_nsec(ae));
300 assertEqualInt(0, archive_entry_atime(ae));
301 assertEqualInt(0, archive_entry_ctime(ae));
302 assertEqualString("dir/", archive_entry_pathname(ae));
303 assertEqualInt(AE_IFDIR | 0755, archive_entry_mode(ae));
304 assertEqualInt(0, archive_entry_size(ae));
305 assertEqualIntA(a, 0, archive_read_data(a, filedata, 10));
307 /* Verify the end of the archive. */
308 assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
310 /* Verify archive format. */
311 assertEqualIntA(a, ARCHIVE_FILTER_NONE, archive_filter_code(a, 0));
312 assertEqualIntA(a, ARCHIVE_FORMAT_7ZIP, archive_format(a));
314 assertEqualInt(ARCHIVE_OK, archive_read_close(a));
315 assertEqualInt(ARCHIVE_OK, archive_read_free(a));
321 test_basic2(const char *compression_type)
324 struct archive_entry *ae;
327 size_t buffsize = 1000;
330 buff = malloc(buffsize);
332 /* Create a new archive in memory. */
333 assert((a = archive_write_new()) != NULL);
334 assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_7zip(a));
335 if (compression_type != NULL &&
336 ARCHIVE_OK != archive_write_set_format_option(a, "7zip",
337 "compression", compression_type)) {
338 skipping("%s writing not fully supported on this platform",
340 assertEqualInt(ARCHIVE_OK, archive_write_free(a));
344 assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
345 assertEqualIntA(a, ARCHIVE_OK,
346 archive_write_open_memory(a, buff, buffsize, &used));
349 * Write a file to it.
351 assert((ae = archive_entry_new()) != NULL);
352 archive_entry_set_mtime(ae, 1, 100);
353 assertEqualInt(1, archive_entry_mtime(ae));
354 assertEqualInt(100, archive_entry_mtime_nsec(ae));
355 archive_entry_copy_pathname(ae, "file");
356 assertEqualString("file", archive_entry_pathname(ae));
357 archive_entry_set_mode(ae, AE_IFREG | 0755);
358 assertEqualInt((AE_IFREG | 0755), archive_entry_mode(ae));
359 archive_entry_set_size(ae, 8);
361 assertEqualInt(0, archive_write_header(a, ae));
362 archive_entry_free(ae);
363 assertEqualInt(8, archive_write_data(a, "12345678", 9));
364 assertEqualInt(0, archive_write_data(a, "1", 1));
367 * Write another file to it.
369 assert((ae = archive_entry_new()) != NULL);
370 archive_entry_set_mtime(ae, 1, 10);
371 assertEqualInt(1, archive_entry_mtime(ae));
372 assertEqualInt(10, archive_entry_mtime_nsec(ae));
373 archive_entry_copy_pathname(ae, "file2");
374 assertEqualString("file2", archive_entry_pathname(ae));
375 archive_entry_set_mode(ae, AE_IFREG | 0755);
376 assertEqualInt((AE_IFREG | 0755), archive_entry_mode(ae));
377 archive_entry_set_size(ae, 4);
379 assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
380 archive_entry_free(ae);
381 assertEqualInt(4, archive_write_data(a, "1234", 5));
384 * Write a directory to it.
386 assert((ae = archive_entry_new()) != NULL);
387 archive_entry_set_mtime(ae, 11, 100);
388 archive_entry_copy_pathname(ae, "dir");
389 archive_entry_set_mode(ae, AE_IFDIR | 0755);
390 archive_entry_set_size(ae, 512);
392 assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
393 failure("size should be zero so that applications know not to write");
394 assertEqualInt(0, archive_entry_size(ae));
395 archive_entry_free(ae);
396 assertEqualIntA(a, 0, archive_write_data(a, "12345678", 9));
399 * Write a sub directory to it.
401 assert((ae = archive_entry_new()) != NULL);
402 archive_entry_set_mtime(ae, 11, 200);
403 archive_entry_copy_pathname(ae, "dir/subdir");
404 archive_entry_set_mode(ae, AE_IFDIR | 0755);
405 archive_entry_set_size(ae, 512);
407 assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
408 failure("size should be zero so that applications know not to write");
409 assertEqualInt(0, archive_entry_size(ae));
410 archive_entry_free(ae);
411 assertEqualIntA(a, 0, archive_write_data(a, "12345678", 9));
414 * Write a sub sub-directory to it.
416 assert((ae = archive_entry_new()) != NULL);
417 archive_entry_set_mtime(ae, 11, 300);
418 archive_entry_copy_pathname(ae, "dir/subdir/subdir");
419 archive_entry_set_mode(ae, AE_IFDIR | 0755);
420 archive_entry_set_size(ae, 512);
422 assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
423 failure("size should be zero so that applications know not to write");
424 assertEqualInt(0, archive_entry_size(ae));
425 archive_entry_free(ae);
426 assertEqualIntA(a, 0, archive_write_data(a, "12345678", 9));
428 /* Close out the archive. */
429 assertEqualInt(ARCHIVE_OK, archive_write_close(a));
430 assertEqualInt(ARCHIVE_OK, archive_write_free(a));
432 /* Verify the initial header. */
433 assertEqualMem(buff, "\x37\x7a\xbc\xaf\x27\x1c\x00\x03", 8);
436 * Now, read the data back.
438 /* With the test memory reader -- seeking mode. */
439 assert((a = archive_read_new()) != NULL);
440 assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
441 assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
442 assertEqualIntA(a, ARCHIVE_OK, read_open_memory_seek(a, buff, used, 7));
445 * Read and verify first file.
447 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
448 assertEqualInt(1, archive_entry_mtime(ae));
449 assertEqualInt(100, archive_entry_mtime_nsec(ae));
450 assertEqualInt(0, archive_entry_atime(ae));
451 assertEqualInt(0, archive_entry_ctime(ae));
452 assertEqualString("file", archive_entry_pathname(ae));
453 assertEqualInt(AE_IFREG | 0755, archive_entry_mode(ae));
454 assertEqualInt(8, archive_entry_size(ae));
455 assertEqualIntA(a, 8,
456 archive_read_data(a, filedata, sizeof(filedata)));
457 assertEqualMem(filedata, "12345678", 8);
461 * Read the second file back.
463 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
464 assertEqualInt(1, archive_entry_mtime(ae));
465 assertEqualInt(0, archive_entry_mtime_nsec(ae));
466 assertEqualInt(0, archive_entry_atime(ae));
467 assertEqualInt(0, archive_entry_ctime(ae));
468 assertEqualString("file2", archive_entry_pathname(ae));
469 assertEqualInt(AE_IFREG | 0755, archive_entry_mode(ae));
470 assertEqualInt(4, archive_entry_size(ae));
471 assertEqualIntA(a, 4,
472 archive_read_data(a, filedata, sizeof(filedata)));
473 assertEqualMem(filedata, "1234", 4);
476 * Read the sub sub-dir entry back.
478 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
479 assertEqualInt(11, archive_entry_mtime(ae));
480 assertEqualInt(300, archive_entry_mtime_nsec(ae));
481 assertEqualInt(0, archive_entry_atime(ae));
482 assertEqualInt(0, archive_entry_ctime(ae));
483 assertEqualString("dir/subdir/subdir/", archive_entry_pathname(ae));
484 assertEqualInt(AE_IFDIR | 0755, archive_entry_mode(ae));
485 assertEqualInt(0, archive_entry_size(ae));
486 assertEqualIntA(a, 0, archive_read_data(a, filedata, 10));
489 * Read the sub dir entry back.
491 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
492 assertEqualInt(11, archive_entry_mtime(ae));
493 assertEqualInt(200, archive_entry_mtime_nsec(ae));
494 assertEqualInt(0, archive_entry_atime(ae));
495 assertEqualInt(0, archive_entry_ctime(ae));
496 assertEqualString("dir/subdir/", archive_entry_pathname(ae));
497 assertEqualInt(AE_IFDIR | 0755, archive_entry_mode(ae));
498 assertEqualInt(0, archive_entry_size(ae));
499 assertEqualIntA(a, 0, archive_read_data(a, filedata, 10));
502 * Read the dir entry back.
504 assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
505 assertEqualInt(11, archive_entry_mtime(ae));
506 assertEqualInt(100, archive_entry_mtime_nsec(ae));
507 assertEqualInt(0, archive_entry_atime(ae));
508 assertEqualInt(0, archive_entry_ctime(ae));
509 assertEqualString("dir/", archive_entry_pathname(ae));
510 assertEqualInt(AE_IFDIR | 0755, archive_entry_mode(ae));
511 assertEqualInt(0, archive_entry_size(ae));
512 assertEqualIntA(a, 0, archive_read_data(a, filedata, 10));
514 /* Verify the end of the archive. */
515 assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
517 /* Verify archive format. */
518 assertEqualIntA(a, ARCHIVE_FILTER_NONE, archive_filter_code(a, 0));
519 assertEqualIntA(a, ARCHIVE_FORMAT_7ZIP, archive_format(a));
521 assertEqualInt(ARCHIVE_OK, archive_read_close(a));
522 assertEqualInt(ARCHIVE_OK, archive_read_free(a));
527 DEFINE_TEST(test_write_format_7zip)
529 /* Test that making a 7-Zip archive file by default compression
530 * in whatever compressions are supported on the running platform. */
532 /* Test that making a 7-Zip archive file without empty files. */
536 DEFINE_TEST(test_write_format_7zip_basic_bzip2)
538 /* Test that making a 7-Zip archive file with bzip2 compression. */
542 DEFINE_TEST(test_write_format_7zip_basic_copy)
544 /* Test that making a 7-Zip archive file without compression. */
548 DEFINE_TEST(test_write_format_7zip_basic_deflate)
550 /* Test that making a 7-Zip archive file with deflate compression. */
551 test_basic("deflate");
554 DEFINE_TEST(test_write_format_7zip_basic_lzma1)
556 /* Test that making a 7-Zip archive file with lzma1 compression. */
560 DEFINE_TEST(test_write_format_7zip_basic_lzma2)
562 /* Test that making a 7-Zip archive file with lzma2 compression. */
566 DEFINE_TEST(test_write_format_7zip_basic_ppmd)
568 /* Test that making a 7-Zip archive file with PPMd compression. */