1--TEST-- 2Test function ftruncate() on zlib wrapper by calling it with its expected arguments 3--SKIPIF-- 4<?php 5if (!extension_loaded("zlib")) { 6 print "skip - ZLIB extension not loaded"; 7} 8?> 9--FILE-- 10<?php 11$f = dirname(__FILE__)."/004.txt.gz"; 12$f2 = "zlib_wrapper_ftruncate_basic.txt.gz"; 13copy($f, $f2); 14 15$h = gzopen($f2, "r"); 16ftruncate($h, 20); 17fclose($h); 18unlink($f2); 19 20$h = gzopen($f2, "w"); 21ftruncate($h, 20); 22fclose($h); 23unlink($f2); 24 25?> 26===DONE=== 27--EXPECTF-- 28 29Warning: ftruncate(): Can't truncate this stream! in %s on line %d 30 31Warning: ftruncate(): Can't truncate this stream! in %s on line %d 32===DONE===