diff options
author | Greg Beaver <cellog@php.net> | 2003-12-11 15:59:08 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2003-12-11 15:59:08 +0000 |
commit | 117698b4c69aeee8d090755c23002624b79c80a9 (patch) | |
tree | 440c5f14e6321369818267df521a14cd0567b851 /pear/tests | |
parent | 541ebbeaebd2e9149c98f6e7a3cfb6933205c316 (diff) | |
download | php-git-117698b4c69aeee8d090755c23002624b79c80a9.tar.gz |
add failure test for non-existing file
Diffstat (limited to 'pear/tests')
-rw-r--r-- | pear/tests/dirtree/package-fail.xml | 42 | ||||
-rw-r--r-- | pear/tests/pear_packager.phpt | 11 |
2 files changed, 52 insertions, 1 deletions
diff --git a/pear/tests/dirtree/package-fail.xml b/pear/tests/dirtree/package-fail.xml new file mode 100644 index 0000000000..f2bf6f15d9 --- /dev/null +++ b/pear/tests/dirtree/package-fail.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> + <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> + <package version="1.0"> + <name>pkg2</name> + <summary>required test for PEAR_Installer</summary> + <description> + fake package + </description> + <license>PHP License</license> + <maintainers> + <maintainer> + <user>fakeuser</user> + <name>Joe Shmoe</name> + <email>nobody@example.com</email> + <role>lead</role> + </maintainer> + </maintainers> + <release> + <version>1.0</version> + <date>2003-12-11</date> + <state>stable</state> + <notes> + second package + </notes> + <filelist> + <dir name="/" baseinstalldir="test" role="php"> + <dir name="multiplepackages" role="php"> + <file>pkg2file.php</file> + </dir> + <dir name="nestedroot" role="php"> + <file>rootfile.php</file> + <dir name="emptydir" role="php"> + <dir name="nesteddir" role="php"> + <file>nestedfile.php</file> + <file>doesntexist.php</file> + </dir> + </dir> + </dir> + </dir> + </filelist> + </release> + </package> diff --git a/pear/tests/pear_packager.phpt b/pear/tests/pear_packager.phpt index d602478f9e..9d584b2609 100644 --- a/pear/tests/pear_packager.phpt +++ b/pear/tests/pear_packager.phpt @@ -125,6 +125,9 @@ for($i=0;$i<count($x2); $i++) { } var_dump($x1, $x2); +echo "test failure:\n"; +$packager->package(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'dirtree' . DIRECTORY_SEPARATOR . 'package-fail.xml'); + unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg1-1.0.tgz'); unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg2-1.0.tgz'); chdir($curdir); @@ -420,4 +423,10 @@ array(4) { ["typeflag"]=> string(0) "" } -}
\ No newline at end of file +} +test failure: +Analyzing multiplepackages\pkg2file.php +Analyzing nestedroot\rootfile.php +Analyzing nestedroot\emptydir\nesteddir\nestedfile.php +Analyzing nestedroot\emptydir\nesteddir\doesntexist.php +Caught error: File does not exist: nestedroot\emptydir\nesteddir\doesntexist.php
\ No newline at end of file |