pajoye Wed, 18 Jan 2012 20:21:40 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=322455
Log: - add test for bug #60761 Bug: https://bugs.php.net/60761 (error getting bug information) Changed paths: A php/php-src/branches/PHP_5_3/ext/zlib/tests/bug60761.phpt A php/php-src/branches/PHP_5_4/ext/zlib/tests/bug60761.phpt A php/php-src/trunk/ext/zlib/tests/bug60761.phpt Added: php/php-src/branches/PHP_5_3/ext/zlib/tests/bug60761.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/zlib/tests/bug60761.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/zlib/tests/bug60761.phpt 2012-01-18 20:21:40 UTC (rev 322455) @@ -0,0 +1,33 @@ +--TEST-- +checks zlib compression size is always the same no matter how many times its run +--FILE-- +<?php + +ob_start(); +phpinfo(); +$html = ob_get_clean(); + +$lens = array(); + +for ( $i=0 ; $i < 200 ; $i++ ) { + //zlib.output_compression = On + //zlib.output_compression_level = 9 + $compressed = gzcompress($html, 9); + + $len = strlen($compressed); + + $lens[$len] = $len; +} + +$lens = array_values($lens); + +echo "Compressed lengths\n"; +var_dump($lens); + +?> +--EXPECTREGEX-- +Compressed lengths +array(1) { + [0]=> + int(%d) +} \ No newline at end of file Added: php/php-src/branches/PHP_5_4/ext/zlib/tests/bug60761.phpt =================================================================== --- php/php-src/branches/PHP_5_4/ext/zlib/tests/bug60761.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/zlib/tests/bug60761.phpt 2012-01-18 20:21:40 UTC (rev 322455) @@ -0,0 +1,33 @@ +--TEST-- +checks zlib compression size is always the same no matter how many times its run +--FILE-- +<?php + +ob_start(); +phpinfo(); +$html = ob_get_clean(); + +$lens = array(); + +for ( $i=0 ; $i < 200 ; $i++ ) { + //zlib.output_compression = On + //zlib.output_compression_level = 9 + $compressed = gzcompress($html, 9); + + $len = strlen($compressed); + + $lens[$len] = $len; +} + +$lens = array_values($lens); + +echo "Compressed lengths\n"; +var_dump($lens); + +?> +--EXPECTREGEX-- +Compressed lengths +array(1) { + [0]=> + int(%d) +} \ No newline at end of file Added: php/php-src/trunk/ext/zlib/tests/bug60761.phpt =================================================================== --- php/php-src/trunk/ext/zlib/tests/bug60761.phpt (rev 0) +++ php/php-src/trunk/ext/zlib/tests/bug60761.phpt 2012-01-18 20:21:40 UTC (rev 322455) @@ -0,0 +1,33 @@ +--TEST-- +checks zlib compression size is always the same no matter how many times its run +--FILE-- +<?php + +ob_start(); +phpinfo(); +$html = ob_get_clean(); + +$lens = array(); + +for ( $i=0 ; $i < 200 ; $i++ ) { + //zlib.output_compression = On + //zlib.output_compression_level = 9 + $compressed = gzcompress($html, 9); + + $len = strlen($compressed); + + $lens[$len] = $len; +} + +$lens = array_values($lens); + +echo "Compressed lengths\n"; +var_dump($lens); + +?> +--EXPECTREGEX-- +Compressed lengths +array(1) { + [0]=> + int(%d) +} \ No newline at end of file
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
