mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
25 lines
503 B
PHP
25 lines
503 B
PHP
--TEST--
|
|
Test function ftruncate() on zlib wrapper by calling it with its expected arguments
|
|
--EXTENSIONS--
|
|
zlib
|
|
--FILE--
|
|
<?php
|
|
$f = __DIR__."/004.txt.gz";
|
|
$f2 = "zlib_wrapper_ftruncate_basic.txt.gz";
|
|
copy($f, $f2);
|
|
|
|
$h = gzopen($f2, "r");
|
|
ftruncate($h, 20);
|
|
fclose($h);
|
|
unlink($f2);
|
|
|
|
$h = gzopen($f2, "w");
|
|
ftruncate($h, 20);
|
|
fclose($h);
|
|
unlink($f2);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: ftruncate(): Can't truncate this stream! in %s on line %d
|
|
|
|
Warning: ftruncate(): Can't truncate this stream! in %s on line %d
|