summaryrefslogtreecommitdiff
path: root/ext/zlib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/tests')
-rw-r--r--ext/zlib/tests/001.phpt2
-rw-r--r--ext/zlib/tests/bug65391.phpt2
-rw-r--r--ext/zlib/tests/bug_52944-darwin.phpt24
-rw-r--r--ext/zlib/tests/bug_52944-win.phpt24
-rw-r--r--ext/zlib/tests/bug_52944.phpt11
-rw-r--r--ext/zlib/tests/data.inc2
-rw-r--r--ext/zlib/tests/gzfile_variation4.phpt2
-rw-r--r--ext/zlib/tests/readgzfile_variation4.phpt2
8 files changed, 10 insertions, 59 deletions
diff --git a/ext/zlib/tests/001.phpt b/ext/zlib/tests/001.phpt
index 0c2ca28c78..4850a65a5a 100644
--- a/ext/zlib/tests/001.phpt
+++ b/ext/zlib/tests/001.phpt
@@ -29,4 +29,4 @@ Strings are equal
100 36864
Strings are equal
5 15
-Strings are equal
+Strings are equal \ No newline at end of file
diff --git a/ext/zlib/tests/bug65391.phpt b/ext/zlib/tests/bug65391.phpt
index 3ba5350810..a93c2c0158 100644
--- a/ext/zlib/tests/bug65391.phpt
+++ b/ext/zlib/tests/bug65391.phpt
@@ -6,6 +6,8 @@ extension_loaded("zlib") or die("skip need zlib");
?>
--GET--
dummy=1
+--INI--
+expose_php=On
--FILE--
<?php
header("Vary: Cookie");
diff --git a/ext/zlib/tests/bug_52944-darwin.phpt b/ext/zlib/tests/bug_52944-darwin.phpt
deleted file mode 100644
index c25babadf5..0000000000
--- a/ext/zlib/tests/bug_52944-darwin.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 (PHP_OS != 'Darwin') {
- die("skip Darwin 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-win.phpt b/ext/zlib/tests/bug_52944-win.phpt
deleted file mode 100644
index fa369f8fb4..0000000000
--- 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 ed4af3e157..68bd53791d 100644
--- a/ext/zlib/tests/bug_52944.phpt
+++ b/ext/zlib/tests/bug_52944.phpt
@@ -2,17 +2,14 @@
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");
-}
--INI--
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');
diff --git a/ext/zlib/tests/data.inc b/ext/zlib/tests/data.inc
index fb20f0bcdf..441199ff08 100644
--- a/ext/zlib/tests/data.inc
+++ b/ext/zlib/tests/data.inc
@@ -85,4 +85,4 @@ That summons thee to heaven or to hell.
QUOTE;
-?>
+?> \ No newline at end of file
diff --git a/ext/zlib/tests/gzfile_variation4.phpt b/ext/zlib/tests/gzfile_variation4.phpt
index 3310231566..9b3128125a 100644
--- a/ext/zlib/tests/gzfile_variation4.phpt
+++ b/ext/zlib/tests/gzfile_variation4.phpt
@@ -2,7 +2,7 @@
Test function gzfile() by substituting argument 1 with float values.
--SKIPIF--
<?php
-if (!extension_loaded(zlib)) die ('skip zlib extension not available in this build');
+if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
?>
--FILE--
<?php
diff --git a/ext/zlib/tests/readgzfile_variation4.phpt b/ext/zlib/tests/readgzfile_variation4.phpt
index 00211f7dfe..32f434cba2 100644
--- a/ext/zlib/tests/readgzfile_variation4.phpt
+++ b/ext/zlib/tests/readgzfile_variation4.phpt
@@ -2,7 +2,7 @@
Test function readgzfile() by substituting argument 1 with float values.
--SKIPIF--
<?php
-if (!extension_loaded(zlib)) die ('skip zlib extension not available in this build');
+if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
?>
--FILE--
<?php