xref: /PHP-5.3/ext/phar/tests/tar/truncated.phpt (revision 16b4d8e0)
1--TEST--
2Phar: truncated tar
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--FILE--
6<?php
7try {
8	$p = new PharData(dirname(__FILE__) . '/files/trunc.tar');
9} catch (Exception $e) {
10	echo $e->getMessage() . "\n";
11}
12
13?>
14===DONE===
15--CLEAN--
16<?php
17unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
18unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
19?>
20--EXPECTF--
21phar error: "%strunc.tar" is a corrupted tar file (truncated)
22===DONE===
23