diff options
| author | Ondřej Surý <ondrej@sury.org> | 2013-05-09 17:32:08 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2013-05-09 17:32:08 +0200 |
| commit | d674441ee1b9e7407f464b2692d9f5a0e2be3b4e (patch) | |
| tree | cc4885524786f143bcc1af7d6c3f86fb571905de /ext/zlib/tests | |
| parent | 367111123281ebfd2876d4c8cf33414b394f489a (diff) | |
| download | php-d674441ee1b9e7407f464b2692d9f5a0e2be3b4e.tar.gz | |
Imported Upstream version 5.5.0~rc1upstream/5.5.0_rc1
Diffstat (limited to 'ext/zlib/tests')
| -rw-r--r-- | ext/zlib/tests/bug_52944-win.phpt | 24 | ||||
| -rw-r--r-- | ext/zlib/tests/bug_52944.phpt | 7 |
2 files changed, 4 insertions, 27 deletions
diff --git a/ext/zlib/tests/bug_52944-win.phpt b/ext/zlib/tests/bug_52944-win.phpt deleted file mode 100644 index fa369f8fb..000000000 --- a/ext/zlib/tests/bug_52944-win.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #52944 (segfault with zlib filter and corrupted data) ---SKIPIF-- -<?php if (!extension_loaded("zlib")) print "skip"; ?> -<?php -if (substr(PHP_OS, 0, 3) != 'WIN') { - die("skip windows only"); -} ---INI-- -allow_url_fopen=1 ---FILE-- -<?php -require dirname(__FILE__) . "/bug_52944_corrupted_data.inc"; - -$fp = fopen('data://text/plain;base64,' . $data, 'r'); -stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ); -var_dump(fread($fp,1)); -var_dump(fread($fp,1)); -fclose($fp); -echo "Done.\n"; ---EXPECT-- -string(1) "%" -string(1) "C" -Done. diff --git a/ext/zlib/tests/bug_52944.phpt b/ext/zlib/tests/bug_52944.phpt index ed4af3e15..ff82d29cc 100644 --- a/ext/zlib/tests/bug_52944.phpt +++ b/ext/zlib/tests/bug_52944.phpt @@ -3,9 +3,6 @@ Bug #52944 (segfault with zlib filter and corrupted data) --SKIPIF-- <?php if (!extension_loaded("zlib")) print "skip"; ?> <?php -if (substr(PHP_OS, 0, 3) == 'WIN') { - die("skip not for windows"); -} if (PHP_OS == 'Darwin') { die("skip not for Darwin"); } @@ -13,6 +10,10 @@ if (PHP_OS == 'Darwin') { allow_url_fopen=1 --FILE-- <?php +/* NOTE this test can fail on asm builds of zlib 1.2.5 or + 1.2.7 on at least Windows and Darwin. Using unoptimized + zlib build fixes the issue. */ + require dirname(__FILE__) . "/bug_52944_corrupted_data.inc"; $fp = fopen('data://text/plain;base64,' . $data, 'r'); |
