com php-src: Replace bug70018 test (broken on non-GNU) with win32 version: ext/standard/tests/general_functions/bug70018-win 32.phpt
ext/standard/tests/general_functions/bug7 0018.phpt

From: Date: Mon, 10 Aug 2015 22:23:24 +0000
Subject: com php-src: Replace bug70018 test (broken on non-GNU) with win32 version: ext/standard/tests/general_functions/bug70018-win 32.phpt
ext/standard/tests/general_functions/bug7 0018.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88611@lists.php.net to get a copy of this message
Commit: 8394713e5d591c87cdc355fffa8803b495697fd4 Author: Andrea Faulds <ajf@ajf.me> Fri, 7 Aug 2015 14:41:47 +0100 Committer: Christoph M. Becker <cmb@php.net> Tue, 11 Aug 2015 00:23:24 +0200 Parents: bdada12dae8a30f468a3e8aa029bedecdf2c767b Branches: PHP-7.0.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8394713e5d591c87cdc355fffa8803b495697fd4 Log: Replace bug70018 test (broken on non-GNU) with win32 version Bugs: https://bugs.php.net/70018 Changed paths: D ext/standard/tests/general_functions/bug70018-win32.phpt M ext/standard/tests/general_functions/bug70018.phpt Diff: diff --git a/ext/standard/tests/general_functions/bug70018-win32.phpt b/ext/standard/tests/general_functions/bug70018-win32.phpt deleted file mode 100644 index 427d816..0000000 --- a/ext/standard/tests/general_functions/bug70018-win32.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Bug #70018 (exec does not strip all whitespace), var 2 ---SKIPIF-- -<?php -if (substr(PHP_OS, 0, 3) != "WIN") { - die("skip.. only for Windows"); -} -if ("cli" != php_sapi_name()) { - die("skip.. CLI only test"); -} -?> ---FILE-- -<?php -$output = array(); - -$test_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()); -file_put_contents($test_fl, '<?php echo "abc\f\n \n";'); - -exec(PHP_BINARY . " -n $test_fl", $output); - -var_dump($output); - -@unlink($test_fl); -?> ---EXPECT-- -array(2) { - [0]=> - string(3) "abc" - [1]=> - string(0) "" -} diff --git a/ext/standard/tests/general_functions/bug70018.phpt b/ext/standard/tests/general_functions/bug70018.phpt index 8685006..d4c38b9 100644 --- a/ext/standard/tests/general_functions/bug70018.phpt +++ b/ext/standard/tests/general_functions/bug70018.phpt @@ -1,16 +1,23 @@ --TEST-- -Bug #70018 (exec does not strip all whitespace), var 1 +Bug #70018 (exec does not strip all whitespace) --SKIPIF-- <?php -if (substr(PHP_OS, 0, 3) == "WIN") { - die("skip.. not for Windows"); +if ("cli" != php_sapi_name()) { + die("skip.. CLI only test"); } ?> --FILE-- <?php $output = array(); -exec('/bin/echo -n -e "abc\f\n \n"',$output); + +$test_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()); +file_put_contents($test_fl, '<?php echo "abc\f\n \n";'); + +exec(PHP_BINARY . " -n $test_fl", $output); + var_dump($output); + +@unlink($test_fl); ?> --EXPECT-- array(2) {

« previous php.cvs (#88611) next »