Annotation of embedaddon/php/ext/zip/tests/bug38944.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #38944 (newly created ZipArchive segfaults when accessing comment property)
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("zip")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: $arc_name = dirname(__FILE__)."/bug38944.zip";
                      9: $foo = new ZipArchive;
                     10: $foo->open($arc_name, ZIPARCHIVE::CREATE);;
                     11: 
                     12: var_dump($foo->status);
                     13: var_dump($foo->statusSys);
                     14: var_dump($foo->numFiles);
                     15: var_dump($foo->filename);
                     16: var_dump($foo->comment);
                     17: 
                     18: var_dump($foo);
                     19: 
                     20: echo "Done\n";
                     21: ?>
                     22: --EXPECTF--    
                     23: int(0)
                     24: int(0)
                     25: int(0)
                     26: string(%d) "%s"
                     27: string(0) ""
                     28: object(ZipArchive)#%d (5) {
                     29:   ["status"]=>
                     30:   int(0)
                     31:   ["statusSys"]=>
                     32:   int(0)
                     33:   ["numFiles"]=>
                     34:   int(0)
                     35:   ["filename"]=>
                     36:   string(%d) "%s"
                     37:   ["comment"]=>
                     38:   string(0) ""
                     39: }
                     40: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>