From: Jani Taskinen Date: Thu, 14 Aug 2008 20:53:31 +0000 (+0000) Subject: MFH: fix tests X-Git-Tag: php-5.2.7RC1~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84c5066dec82106d3c9a6dadf20472b468e5b63f;p=php MFH: 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/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 c0bb319f7a..a881a0730e 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-- -You cannot use both -n and -c switch. Use -h for help. -NULL Either execute direct code, process stdin or use a file. NULL 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 "