diff options
author | Anatol Belski <ab@php.net> | 2015-07-16 15:04:41 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-07-16 15:05:04 +0200 |
commit | 0dce8373cdc84c9422dbb94910833d5d34c3d73b (patch) | |
tree | c1181cebac522b06f9a2b8b12fb4ef7d2bc186dd | |
parent | deeb6379cb26d457badae58df4f24bc30a334ebe (diff) | |
download | php-git-0dce8373cdc84c9422dbb94910833d5d34c3d73b.tar.gz |
forked test for windows
-rw-r--r-- | ext/standard/tests/general_functions/bug70018-win32.phpt | 31 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/bug70018.phpt | 8 |
2 files changed, 38 insertions, 1 deletions
diff --git a/ext/standard/tests/general_functions/bug70018-win32.phpt b/ext/standard/tests/general_functions/bug70018-win32.phpt new file mode 100644 index 0000000000..427d816e4a --- /dev/null +++ b/ext/standard/tests/general_functions/bug70018-win32.phpt @@ -0,0 +1,31 @@ +--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 4862010a31..8685006092 100644 --- a/ext/standard/tests/general_functions/bug70018.phpt +++ b/ext/standard/tests/general_functions/bug70018.phpt @@ -1,5 +1,11 @@ --TEST-- -Bug #70018 (exec does not strip all whitespace) +Bug #70018 (exec does not strip all whitespace), var 1 +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == "WIN") { + die("skip.. not for Windows"); +} +?> --FILE-- <?php $output = array(); |