Annotation of embedaddon/php/ext/zip/tests/bug11216.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #11216 (::addEmptyDir() crashes when the directory already exists)
3: --SKIPIF--
4: <?php
1.1.1.2 ! misho 5: /* $Id$ */
1.1 misho 6: if(!extension_loaded('zip')) die('skip');
7: ?>
8: --FILE--
9: <?php
10: $archive = new ZipArchive();
11: $archive->open('__test.zip', ZIPARCHIVE::CREATE);
12: var_dump($archive->addEmptyDir('test'));
13: print_r($archive);
14: var_dump($archive->addEmptyDir('test'));
15: $archive->close();
16: unlink('__test.zip');
17: ?>
18: --EXPECTF--
19: bool(true)
20: ZipArchive Object
21: (
22: [status] => 0
23: [statusSys] => 0
24: [numFiles] => 1
25: [filename] => %s
26: [comment] =>
27: )
28: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>