File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / zlib / tests / gztell_basic.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:05 2012 UTC (12 years, 8 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
Test function gztell() by calling it with its expected arguments when reading
--SKIPIF--
<?php 
if (!extension_loaded("zlib")) {
	print "skip - ZLIB extension not loaded"; 
}
?>
--FILE--
<?php
$f = dirname(__FILE__)."/004.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);
?>
===DONE===
--EXPECT--
int(0)
int(7)
int(29)
int(83)
int(100)
int(127)
int(142)
int(176)
===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>