[PHP-CVS] cvs: php-src /sapi/cli/tests 001.phpt
helly Tue Nov 4 00:34:24 2008 UTC Modified files: /php-src/sapi/cli/tests 001.phpt Log: - Cleanup http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/001.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/001.phpt diff -u php-src/sapi/cli/tests/001.phpt:1.2 php-src/sapi/cli/tests/001.phpt:1.3 --- php-src/sapi/cli/tests/001.phpt:1.2 Sat Jan 20 22:12:45 2007 +++ php-src/sapi/cli/tests/001.phpt Tue Nov 4 00:34:24 2008 @@ -7,7 +7,7 @@ $php = getenv('TEST_PHP_EXECUTABLE'); -var_dump(`$php -n -v`); +var_dump(`$php -n -v`); echo Done\n; ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cli/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt
tony2001Sat Jan 20 22:12:45 2007 UTC Modified files: /php-src/sapi/cli/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt Log: use getenv() http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/001.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/sapi/cli/tests/001.phpt diff -u php-src/sapi/cli/tests/001.phpt:1.1 php-src/sapi/cli/tests/001.phpt:1.2 --- php-src/sapi/cli/tests/001.phpt:1.1 Fri Nov 24 13:32:07 2006 +++ php-src/sapi/cli/tests/001.phpt Sat Jan 20 22:12:45 2007 @@ -5,7 +5,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); var_dump(`$php -n -v`); http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/002.phpt diff -u php-src/sapi/cli/tests/002.phpt:1.2 php-src/sapi/cli/tests/002.phpt:1.3 --- php-src/sapi/cli/tests/002.phpt:1.2 Mon Dec 4 17:48:27 2006 +++ php-src/sapi/cli/tests/002.phpt Sat Jan 20 22:12:45 2007 @@ -10,7 +10,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); var_dump(`$php -n -r 'var_dump(hello);'`); http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/003.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/sapi/cli/tests/003.phpt diff -u php-src/sapi/cli/tests/003.phpt:1.1 php-src/sapi/cli/tests/003.phpt:1.2 --- php-src/sapi/cli/tests/003.phpt:1.1 Fri Nov 24 13:32:07 2006 +++ php-src/sapi/cli/tests/003.phpt Sat Jan 20 22:12:45 2007 @@ -10,7 +10,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); var_dump(`$php -n -d max_execution_time=111 -r 'var_dump(ini_get(max_execution_time));'`); var_dump(`$php -n -d max_execution_time=500 -r 'var_dump(ini_get(max_execution_time));'`); http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/004.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/004.phpt diff -u php-src/sapi/cli/tests/004.phpt:1.2 php-src/sapi/cli/tests/004.phpt:1.3 --- php-src/sapi/cli/tests/004.phpt:1.2 Mon Dec 4 17:48:27 2006 +++ php-src/sapi/cli/tests/004.phpt Sat Jan 20 22:12:45 2007 @@ -5,7 +5,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); var_dump(`$php -n --rf unknown`); var_dump(`$php -n --rf echo`); http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/005.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/005.phpt diff -u php-src/sapi/cli/tests/005.phpt:1.2 php-src/sapi/cli/tests/005.phpt:1.3 --- php-src/sapi/cli/tests/005.phpt:1.2 Mon Dec 4 17:48:27 2006 +++ php-src/sapi/cli/tests/005.phpt Sat Jan 20 22:12:45 2007 @@ -5,7 +5,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); var_dump(`$php -n --rc unknown`); var_dump(`$php -n --rc stdclass`); http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/006.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/006.phpt diff -u php-src/sapi/cli/tests/006.phpt:1.2 php-src/sapi/cli/tests/006.phpt:1.3 --- php-src/sapi/cli/tests/006.phpt:1.2 Mon Dec 4 17:48:27 2006 +++ php-src/sapi/cli/tests/006.phpt Sat Jan 20 22:12:45 2007 @@ -5,7 +5,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); var_dump(`$php -n --re unknown`); var_dump(`$php -n --re `); http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/007.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/007.phpt diff -u php-src/sapi/cli/tests/007.phpt:1.2 php-src/sapi/cli/tests/007.phpt:1.3 --- php-src/sapi/cli/tests/007.phpt:1.2 Mon Dec 4 17:48:27 2006 +++ php-src/sapi/cli/tests/007.phpt Sat Jan 20 22:12:45 2007 @@ -10,7 +10,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); $filename = dirname(__FILE__).'/007.test.php'; $code =' http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/008.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/008.phpt diff -u php-src/sapi/cli/tests/008.phpt:1.2 php-src/sapi/cli/tests/008.phpt:1.3 --- php-src/sapi/cli/tests/008.phpt:1.2 Mon Dec 4 17:48:27 2006 +++ php-src/sapi/cli/tests/008.phpt Sat Jan 20 22:12:45 2007 @@ -10,7 +10,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php = getenv('TEST_PHP_EXECUTABLE'); $filename = dirname(__FILE__).'/008.test.php'; $code =' http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/009.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/sapi/cli/tests/009.phpt diff -u php-src/sapi/cli/tests/009.phpt:1.2 php-src/sapi/cli/tests/009.phpt:1.3 --- php-src/sapi/cli/tests/009.phpt:1.2 Mon Dec 4 17:48:27 2006 +++ php-src/sapi/cli/tests/009.phpt Sat Jan 20 22:12:45 2007 @@ -5,7 +5,7 @@ --FILE-- ?php -$php = $_ENV['TEST_PHP_EXECUTABLE']; +$php =
Re: [PHP-CVS] cvs: php-src /sapi/cli/tests 001.phpt 002-win32.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt skipi
Hello Antony, you are using $_ENV['TEST_PHP_EXECUTABLE'] here alot. Wouldn't it be better to use --ARGS-- section instead? best regards marcus Friday, November 24, 2006, 2:32:07 PM, you wrote: http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/001.phpt?view=markuprev=1.1 Index: php-src/sapi/cli/tests/001.phpt +++ php-src/sapi/cli/tests/001.phpt --TEST-- version string --SKIPIF-- ?php include skipif.inc; ? --FILE-- ?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`$php -n -v`); echo Done\n; ? --EXPECTF-- string(%d) PHP %s (cli) (built: %s)%s Copyright (c) 1997-20%d The PHP Group Zend Engine v%s, Copyright (c) 1998-20%d Zend Technologies Done Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cli/tests 001.phpt 002-win32.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt skipif.in
tony2001Fri Nov 24 13:32:07 2006 UTC Added files: /php-src/sapi/cli/tests 001.phpt 002-win32.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt skipif.inc Log: add tests for CLI http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/001.phpt?view=markuprev=1.1 Index: php-src/sapi/cli/tests/001.phpt +++ php-src/sapi/cli/tests/001.phpt --TEST-- version string --SKIPIF-- ?php include skipif.inc; ? --FILE-- ?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`$php -n -v`); echo Done\n; ? --EXPECTF-- string(%d) PHP %s (cli) (built: %s)%s Copyright (c) 1997-20%d The PHP Group Zend Engine v%s, Copyright (c) 1998-20%d Zend Technologies Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002-win32.phpt?view=markuprev=1.1 Index: php-src/sapi/cli/tests/002-win32.phpt +++ php-src/sapi/cli/tests/002-win32.phpt --TEST-- running code with -r --SKIPIF-- ?php include skipif.inc; if (substr(PHP_OS, 0, 3) != 'WIN') { die (skip only for Windows); } ? --FILE-- ?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`$php -r var_dump('hello');`); echo Done\n; ? --EXPECTF-- string(18) string(5) hello Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002.phpt?view=markuprev=1.1 Index: php-src/sapi/cli/tests/002.phpt +++ php-src/sapi/cli/tests/002.phpt --TEST-- running code with -r --SKIPIF-- ?php include skipif.inc; if (substr(PHP_OS, 0, 3) == 'WIN') { die (skip not for Windows); } ? --FILE-- ?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`$php -r 'var_dump(hello);'`); echo Done\n; ? --EXPECTF-- string(18) string(5) hello Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/003.phpt?view=markuprev=1.1 Index: php-src/sapi/cli/tests/003.phpt +++ php-src/sapi/cli/tests/003.phpt --TEST-- defining INI options with -d --SKIPIF-- ?php include skipif.inc; if (substr(PHP_OS, 0, 3) == 'WIN') { die (skip not for Windows); } ? --FILE-- ?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`$php -n -d max_execution_time=111 -r 'var_dump(ini_get(max_execution_time));'`); var_dump(`$php -n -d max_execution_time=500 -r 'var_dump(ini_get(max_execution_time));'`); var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 -r 'var_dump(ini_get(max_execution_time));'`); var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 -r 'var_dump(ini_get(max_execution_time)); var_dump(ini_get(upload_tmp_dir));'`); echo Done\n; ? --EXPECTF-- string(16) string(3) 111 string(16) string(3) 500 string(16) string(3) 555 string(40) string(3) 555 string(10) /test/path Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/004.phpt?view=markuprev=1.1 Index: php-src/sapi/cli/tests/004.phpt +++ php-src/sapi/cli/tests/004.phpt --TEST-- show information about function --SKIPIF-- ?php include skipif.inc; ? --FILE-- ?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`$php --rf unknown`); var_dump(`$php --rf echo`); var_dump(`$php --rf phpinfo`); echo Done\n; ? --EXPECTF-- string(45) Exception: Function unknown() does not exist string(42) Exception: Function echo() does not exist string(119) Function [ internal:standard function phpinfo ] { - Parameters [1] { Parameter #0 [ optional $what ] } } Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/005.phpt?view=markuprev=1.1 Index: php-src/sapi/cli/tests/005.phpt +++ php-src/sapi/cli/tests/005.phpt --TEST-- show information about class --SKIPIF-- ?php include skipif.inc; ? --FILE-- ?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`$php --rc unknown`); var_dump(`$php --rc stdclass`); var_dump(`$php --rc exception`); echo Done\n; ? --EXPECTF-- string(40) Exception: Class unknown does not exist string(178) Class [ internal class stdClass ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [0] { } } string(1141) Class [ internal class Exception ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [6] { Property [ default protected $message ] Property [ default private $string ] Property [ default protected $code ] Property [ default protected $file ] Property [ default protected $line ] Property [ default private $trace ] } - Methods [9] { Method [ internal final private method __clone ] { } Method [ internal, ctor public method __construct ] { - Parameters [2] { Parameter #0 [ optional $message ] Parameter #1 [ optional $code ] } } Method [ internal final public method getMessage ] { } Method [ internal final public method getCode ] { } Method [ internal final public method