Annotation of embedaddon/php/ext/phar/tests/zip/badalias.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Phar: invalid aliases
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("phar")) die("skip"); ?>
! 5: <?php if (!extension_loaded("zlib")) die("skip no zlib"); ?>
! 6: <?php if (!extension_loaded("bz2")) die("skip no bz2"); ?>
! 7: --FILE--
! 8: <?php
! 9: $e = dirname(__FILE__) . '/files/';
! 10: for ($i = 1; $i <= 5; $i++) {
! 11: try {
! 12: new Phar($e . "badalias$i.phar.zip");
! 13: } catch (Exception $ee) {
! 14: echo $ee->getMessage(), "\n";
! 15: }
! 16: }
! 17: ?>
! 18: ===DONE===
! 19: --EXPECTF--
! 20: phar error: invalid alias "hi/there" in zip-based phar "%sbadalias1.phar.zip"
! 21: phar error: invalid alias "hi\there" in zip-based phar "%sbadalias2.phar.zip"
! 22: phar error: invalid alias "hi\there" in zip-based phar "%sbadalias3.phar.zip"
! 23: phar error: invalid alias "hi;there" in zip-based phar "%sbadalias4.phar.zip"
! 24: phar error: invalid alias "hi:there" in zip-based phar "%sbadalias5.phar.zip"
! 25: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>