From 8001dfd8d07e40b6ca81e7203a5de837ab1944a7 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sun, 20 Apr 2008 14:54:05 +0000 Subject: [PATCH] new test, increases code coverage slightly --- ext/phar/tests/tar/exists_as_phar.phpt | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ext/phar/tests/tar/exists_as_phar.phpt diff --git a/ext/phar/tests/tar/exists_as_phar.phpt b/ext/phar/tests/tar/exists_as_phar.phpt new file mode 100644 index 0000000000..6d03983c8d --- /dev/null +++ b/ext/phar/tests/tar/exists_as_phar.phpt @@ -0,0 +1,37 @@ +--TEST-- +Phar: phar-based phar named with ".tar" fails +--SKIPIF-- + +--INI-- +phar.readonly=0 +phar.require_hash=0 +--FILE-- +'; +$phar->setAlias('hio'); +$phar->addEmptyDir('test'); +$phar->stopBuffering(); +copy($fname, $tname); + +try { + $p = new Phar($tname); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} + +?> +===DONE=== +--CLEAN-- + +--EXPECTF-- +phar tar error: "%sexists_as_phar.phar.tar" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar +===DONE=== -- 2.40.0