diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-21 16:59:30 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-22 10:50:56 +0100 |
commit | 914c1ec1d4e65ac599762388df5a22696e2f968b (patch) | |
tree | 868efb1f7bef97318c7da07f390d4ce9cb5ad9e6 /ext/standard/tests/file/popen_pclose_error.phpt | |
parent | 427ebce6295b296c1f18f6bd927bf3cd295be815 (diff) | |
download | php-git-914c1ec1d4e65ac599762388df5a22696e2f968b.tar.gz |
Stricter validation for popen mode argument on Windows
Context: The ext/standard/tests/file/popen_pclose_error-win32.phpt
test often fails under parallel testing, because the "is not recognized
as an internal or external command" message doesn't actually have a
guaranteed position in the output.
While looking into this, I noticed that this test on Windows tests
something very different (invalid comand) than on Linux (invalid mode).
Here I'm adjusting the Windows popen implementation so it immediately
fails on a `rw` mode, just like it does on Linux.
Diffstat (limited to 'ext/standard/tests/file/popen_pclose_error.phpt')
-rw-r--r-- | ext/standard/tests/file/popen_pclose_error.phpt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/tests/file/popen_pclose_error.phpt b/ext/standard/tests/file/popen_pclose_error.phpt index 280e93427a..93ed5d946e 100644 --- a/ext/standard/tests/file/popen_pclose_error.phpt +++ b/ext/standard/tests/file/popen_pclose_error.phpt @@ -2,8 +2,8 @@ Test popen() and pclose function: error conditions --SKIPIF-- <?php -if(substr(PHP_OS, 0, 3) == 'WIN' || strtoupper( substr(PHP_OS, 0, 3) ) == 'SUN') - die("skip Not Valid for Windows & Sun Solaris"); +if (strtoupper( substr(PHP_OS, 0, 3) ) == 'SUN') + die("skip Not Valid for Sun Solaris"); ?> --FILE-- <?php |