]> granicus.if.org Git - php/commitdiff
- Fix tests
authorJani Taskinen <jani@php.net>
Thu, 14 Aug 2008 20:05:00 +0000 (20:05 +0000)
committerJani Taskinen <jani@php.net>
Thu, 14 Aug 2008 20:05:00 +0000 (20:05 +0000)
sapi/cgi/tests/005.phpt
sapi/cgi/tests/006.phpt
sapi/cgi/tests/007.phpt
sapi/cgi/tests/include.inc
sapi/cli/tests/009.phpt
sapi/cli/tests/015.phpt
sapi/cli/tests/021.phpt

index 6d82b0f311cc133a7c119fb9f8380d020d5d83c2..34a28f9c5e8e70529fc232e566adb6f12fc4b221 100644 (file)
@@ -10,15 +10,12 @@ include "include.inc";
 $php = get_cgi_path();
 reset_env_vars();
 
-var_dump(`$php -n -c -f 'wrong'`);
 var_dump(`$php -n -a -f 'wrong'`);
 var_dump(`$php -n -f 'wrong' -a`);
 
 echo "Done\n";
 ?>
 --EXPECTF--    
-string(55) "You cannot use both -n and -c switch. Use -h for help.
-"
 string(51) "No input file specified.
 Interactive mode enabled
 
index 107ddc7747f44ccaa490be8cf6ceffce3c40bb51..e183fea6bcd4a1e5f5c58a5b795da9a3c0e39ef3 100644 (file)
@@ -42,7 +42,7 @@ class test
 
 file_put_contents($filename, $code);
 
-var_dump(`"$php" -n -l "$filename" 2>/dev/null`);
+var_dump(`"$php" -l "$filename" 2>/dev/null`);
 
 @unlink($filename);
 
index c0f8df1bffee77566d0dde7a533a6b32fc7d2d0c..92bf0f6aa33491af40a39d954fc6380f27736ca4 100644 (file)
@@ -10,7 +10,7 @@ $php = get_cgi_path();
 reset_env_vars();
 
 var_dump(`"$php" -n -f some.php -f some.php`);
-var_dump(`"$php" -s -w -l`);
+var_dump(`"$php" -n -s -w -l`);
 
 echo "Done\n";
 ?>
index 11bf8f3b81a203bfdbb4039410e71efeae720204..2d8ed8a2e397e8a0e4c80bdfa0738f59fdd0fc7b 100644 (file)
@@ -8,7 +8,7 @@ function get_cgi_path() /* {{{ */
        $cgi = false;
 
        if (file_exists($php) && is_executable($php)) {
-               $version = `$php -v`;
+               $version = `$php -n -v`;
                if (strstr($version, "(cli)")) {
                        /* that's cli */
                        $cli = true;
index e1b13e96603d6281af53691d2cc66492d605851c..33f859fb388c3e5a0e6091dc1e14d621b7069c11 100644 (file)
@@ -7,15 +7,12 @@ using invalid combinations of cmdline options
 
 $php = getenv('TEST_PHP_EXECUTABLE');
 
-var_dump(`$php -n -c -r "echo hello;"`);
 var_dump(`$php -n -a -r "echo hello;"`);
 var_dump(`$php -n -r "echo hello;" -a`);
 
 echo "Done\n";
 ?>
 --EXPECTF--    
-string(55) "You cannot use both -n and -c switch. Use -h for help.
-"
 string(57) "Either execute direct code, process stdin or use a file.
 "
 string(57) "Either execute direct code, process stdin or use a file.
index 4d522675925e9b9785c9733416bad79545c93149..ab5918b4d23c5cc44ab6b07aca0475504558786a 100644 (file)
@@ -13,10 +13,10 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
 $php = getenv('TEST_PHP_EXECUTABLE');
 
 
-echo `"$php" --version | grep built:`;
-echo `echo "<?php print_r(\\\$argv);" | "$php" -- foo bar baz`, "\n";
-echo `"$php" --version foo bar baz | grep built:`;
-echo `"$php" --notexisting foo bar baz | grep Usage:`;
+echo `"$php" -n --version | grep built:`;
+echo `echo "<?php print_r(\\\$argv);" | "$php" -n -- foo bar baz`, "\n";
+echo `"$php" -n --version foo bar baz | grep built:`;
+echo `"$php" -n --notexisting foo bar baz | grep Usage:`;
 
 echo "Done\n";
 ?>
index 81adc27ada327800729fd8b8cdbb23d8b949bcc1..a4442b0e02d153574d70846a2a90baa14d0f27b7 100644 (file)
@@ -14,7 +14,7 @@ $php = getenv('TEST_PHP_EXECUTABLE');
 
 $filename = __DIR__.'/021.tmp.php';
 
-$script = "#!$php\n".
+$script = "#!$php -n\n".
           "ola\n".
           "<?php echo 1+1,'\n';\n".
           "?>\n".