1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/zlib/tests/gztell_basic.phpt
Gina Peter Banyard 5bd18e3fdc ext/zlib: Refactor tests (#18887)
- Use INI sections
- Use CGI sections
- Move data into a subfolder
- Remove ZPP tests
- Fix various bugs within tests
- Simplify some


Found while working on #18879
2025-06-21 18:03:50 +01:00

29 lines
518 B
PHP

--TEST--
Test function gztell() by calling it with its expected arguments when reading
--EXTENSIONS--
zlib
--FILE--
<?php
$f = __DIR__."/data/test.txt.gz";
$h = gzopen($f, 'r');
$intervals = array(7, 22, 54, 17, 27, 15, 1000);
// tell should be 7, 29, 83, 100, 127, 142, 176 (176 is length of uncompressed file)
var_dump(gztell($h));
foreach ($intervals as $interval) {
gzread($h, $interval);
var_dump(gztell($h));
}
gzclose($h);
?>
--EXPECT--
int(0)
int(7)
int(29)
int(83)
int(100)
int(127)
int(142)
int(176)