]> granicus.if.org Git - php/commitdiff
fix test 1, add in nifty SKIPIF code
authorGreg Beaver <cellog@php.net>
Fri, 31 Oct 2003 22:30:37 +0000 (22:30 +0000)
committerGreg Beaver <cellog@php.net>
Fri, 31 Oct 2003 22:30:37 +0000 (22:30 +0000)
pear/tests/pear_installer1.phpt

index 65fd5536fcefc0d1a3959cc428ebe775dd81f1d8..fe2516202b37eca81a726b15b2182b9600405c30 100644 (file)
@@ -1,7 +1,11 @@
 --TEST--
 PEAR_Installer test #1
 --SKIPIF--
-skip
+<?php
+if (!getenv('PHP_PEAR_RUNTESTS')) {
+    echo 'skip';
+}
+?>
 --FILE--
 <?php
 
@@ -12,8 +16,9 @@ $ui = false;
 $installer = new PEAR_Installer($ui);
 echo "test extractDownloadFileName:\n";
 echo 'existing file: ';
-echo $installer->extractDownloadFileName($temp_path . DIRECTORY_SEPARATOR . 'user.conf',
-    $ui);
+echo ($temp_path . DIRECTORY_SEPARATOR . 'user.conf' ==
+     $installer->extractDownloadFileName($temp_path . DIRECTORY_SEPARATOR . 'user.conf',
+    $ui)) ? "yes\n" : "no\n";
 var_dump($ui);
 echo 'invalid match: ';
 echo $installer->extractDownloadFileName('27',
@@ -70,7 +75,8 @@ var_dump($res);
 --POST--
 --EXPECT--
 test extractDownloadFileName:
-existing file: c:\web pages\chiara\testinstallertemp\user.confbool(false)
+existing file: yes
+bool(false)
 invalid match: 27
 NULL
 valid match, no version: Testpackage