summaryrefslogtreecommitdiff
path: root/ext/phar/tests/tar/truncated.phpt
blob: 66148a7d288061e7cc6d214425a6d14174fed747 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Phar: truncated tar
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE--
<?php
try {
	$p = new PharData(__DIR__ . '/files/trunc.tar');
} catch (Exception $e) {
	echo $e->getMessage() . "\n";
}

?>
===DONE===
--CLEAN--
<?php
unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar');
?>
--EXPECTF--
phar error: "%strunc.tar" is a corrupted tar file (truncated)
===DONE===