Browse Source

- PECL #11216 test

experimental/5.2-WITH_DRCP
Pierre Joye 19 years ago
parent
commit
fd2e66bd05
  1. 27
      ext/zip/tests/bug11216.phpt

27
ext/zip/tests/bug11216.phpt

@ -0,0 +1,27 @@
--TEST--
Bug #11216 (::addEmptyDir() crashes when the directory already exists)
--SKIPIF--
<?php
/* $Id$ */
if(!extension_loaded('zip')) die('skip');
?>
--FILE--
<?php
$archive = new ZipArchive();
$archive->open('__test.zip', ZIPARCHIVE::CREATE);
var_dump($archive->addEmptyDir('test'));
var_dump($archive->addEmptyDir('test'));
$archive->close();
unlink('__test.zip');
?>
--EXPECT--
bool(true)
ZipArchive Object
(
[status] => 0
[statusSys] => 0
[numFiles] => 1
[filename] =>
[comment] =>
)
bool(false)
Loading…
Cancel
Save