xref: /PHP-7.2/ext/bz2/tests/bug51997.phpt (revision f1d7e3ca)
1--TEST--
2Bug #51997 (SEEK_CUR with 0 value, returns a warning)
3--SKIPIF--
4<?php if (!extension_loaded("bz2")) print "skip"; ?>
5--FILE--
6<?php
7
8error_reporting(E_ALL);
9
10$filename = "bug51997.bz2";
11$str = "This is a test string.\n";
12$bz = bzopen($filename, "w");
13bzwrite($bz, $str);
14bzclose($bz);
15
16$bz = bzopen($filename, "r");
17fseek($bz, 0, SEEK_CUR);
18print bzread($bz, 10);
19print bzread($bz);
20bzclose($bz);
21unlink($filename);
22--EXPECT--
23This is a test string.
24