Annotation of embedaddon/php/ext/zip/tests/bug11216.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #11216 (::addEmptyDir() crashes when the directory already exists)
        !             3: --SKIPIF--
        !             4: <?php
        !             5: /* $Id: bug11216.phpt 273126 2009-01-08 22:03:32Z tony2001 $ */
        !             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>