diff options
author | Pierre Joye <pajoye@php.net> | 2007-06-03 19:50:36 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2007-06-03 19:50:36 +0000 |
commit | fd2e66bd05022b023379de86577e3498fded0e96 (patch) | |
tree | a654b801a8f98951ed063ef19d23c30f91c800c2 /ext | |
parent | ef952b0383745f4543007076080b85829367018e (diff) | |
download | php-git-fd2e66bd05022b023379de86577e3498fded0e96.tar.gz |
- PECL #11216 test
Diffstat (limited to 'ext')
-rw-r--r-- | ext/zip/tests/bug11216.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/zip/tests/bug11216.phpt b/ext/zip/tests/bug11216.phpt new file mode 100644 index 0000000000..b5fa9b93bd --- /dev/null +++ b/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) |