diff options
author | Jani Taskinen <jani@php.net> | 2008-08-14 20:51:35 +0000 |
---|---|---|
committer | Jani Taskinen <jani@php.net> | 2008-08-14 20:51:35 +0000 |
commit | 13dff7488993df10563353ae3f4bd4f517dce3e6 (patch) | |
tree | 2750c94f9e7d7561806378128d64b56dfd92fd9d | |
parent | ec8318b438b84645d0fd10bfd065bfdc4739aa9b (diff) | |
download | php-git-13dff7488993df10563353ae3f4bd4f517dce3e6.tar.gz |
fix tests
-rw-r--r-- | sapi/cgi/tests/005.phpt | 3 | ||||
-rw-r--r-- | sapi/cgi/tests/006.phpt | 2 | ||||
-rw-r--r-- | sapi/cgi/tests/007.phpt | 2 | ||||
-rw-r--r-- | sapi/cgi/tests/include.inc | 2 | ||||
-rw-r--r-- | sapi/cli/tests/009.phpt | 3 | ||||
-rw-r--r-- | sapi/cli/tests/015.phpt | 8 | ||||
-rw-r--r-- | sapi/cli/tests/021.phpt | 2 |
7 files changed, 8 insertions, 14 deletions
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 aa2067d513..f2c9c0226c 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`); ?> ===DONE=== 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 "<?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"; ?> 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". "<?php echo 1+1,'\n';\n". "?>\n". |