From: Jani Taskinen Date: Thu, 14 Aug 2008 20:05:00 +0000 (+0000) Subject: - Fix tests X-Git-Tag: BEFORE_HEAD_NS_CHANGE~719 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a6f6baa86c6346b7b5ec648eb5dfbd789c30512;p=php - Fix tests --- diff --git a/sapi/cgi/tests/005.phpt b/sapi/cgi/tests/005.phpt index 6d82b0f311..34a28f9c5e 100644 --- a/sapi/cgi/tests/005.phpt +++ b/sapi/cgi/tests/005.phpt @@ -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 diff --git a/sapi/cgi/tests/006.phpt b/sapi/cgi/tests/006.phpt index 107ddc7747..e183fea6bc 100644 --- a/sapi/cgi/tests/006.phpt +++ b/sapi/cgi/tests/006.phpt @@ -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); diff --git a/sapi/cgi/tests/007.phpt b/sapi/cgi/tests/007.phpt index c0f8df1bff..92bf0f6aa3 100644 --- a/sapi/cgi/tests/007.phpt +++ b/sapi/cgi/tests/007.phpt @@ -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"; ?> diff --git a/sapi/cgi/tests/include.inc b/sapi/cgi/tests/include.inc index 11bf8f3b81..2d8ed8a2e3 100644 --- a/sapi/cgi/tests/include.inc +++ b/sapi/cgi/tests/include.inc @@ -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; diff --git a/sapi/cli/tests/009.phpt b/sapi/cli/tests/009.phpt index e1b13e9660..33f859fb38 100644 --- a/sapi/cli/tests/009.phpt +++ b/sapi/cli/tests/009.phpt @@ -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. diff --git a/sapi/cli/tests/015.phpt b/sapi/cli/tests/015.phpt index 4d52267592..ab5918b4d2 100644 --- a/sapi/cli/tests/015.phpt +++ b/sapi/cli/tests/015.phpt @@ -13,10 +13,10 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { $php = getenv('TEST_PHP_EXECUTABLE'); -echo `"$php" --version | grep built:`; -echo `echo " diff --git a/sapi/cli/tests/021.phpt b/sapi/cli/tests/021.phpt index 81adc27ada..a4442b0e02 100644 --- a/sapi/cli/tests/021.phpt +++ b/sapi/cli/tests/021.phpt @@ -14,7 +14,7 @@ $php = getenv('TEST_PHP_EXECUTABLE'); $filename = __DIR__.'/021.tmp.php'; -$script = "#!$php\n". +$script = "#!$php -n\n". "ola\n". "\n".