php-src/ext/zip/tests/bug53885.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

25 lines
499 B
PHP

--TEST--
Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive)
--SKIPIF--
<?php
if(!extension_loaded('zip')) die('skip');
?>
--FILE--
<?php
$fname = dirname(__FILE__)."/test53885.zip";
if(file_exists($fname)) unlink($fname);
touch($fname);
$nx=new ZipArchive();
$nx->open($fname);
$nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED);
$nx->statName("a",ZIPARCHIVE::FL_UNCHANGED);
?>
==DONE==
--CLEAN--
<?php
$fname = dirname(__FILE__)."/test53885.zip";
unlink($fname);
?>
--EXPECT--
==DONE==