mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Merge branch 'PHP-8.2'
* PHP-8.2: adapt test expectation with libzip 1.10
This commit is contained in:
commit
4a9fe2a214
@ -34,13 +34,17 @@ fclose($fp);
|
||||
|
||||
echo "== Index, changed\n";
|
||||
$fp = $zip->getStreamIndex(1);
|
||||
var_dump($zip->status);
|
||||
if (version_compare(ZipArchive::LIBZIP_VERSION, "1.10.0", "<")) {
|
||||
/* not supported in old version */
|
||||
var_dump($zip->status === ZipArchive::ER_CHANGED);
|
||||
} else {
|
||||
var_dump($zip->status === 0 && stream_get_contents($fp) === "baz");
|
||||
}
|
||||
$zip->clearError();
|
||||
|
||||
echo "== Index, unchanged\n";
|
||||
$fp = $zip->getStreamIndex(1, ZipArchive::FL_UNCHANGED);
|
||||
var_dump($zip->status);
|
||||
var_dump(stream_get_contents($fp));
|
||||
var_dump($zip->status === 0 && stream_get_contents($fp) === "bar");
|
||||
$zip->clearError();
|
||||
fclose($fp);
|
||||
|
||||
@ -60,8 +64,7 @@ string(3) "foo"
|
||||
int(0)
|
||||
string(3) "foo"
|
||||
== Index, changed
|
||||
int(15)
|
||||
bool(true)
|
||||
== Index, unchanged
|
||||
int(0)
|
||||
string(3) "bar"
|
||||
bool(true)
|
||||
== Done
|
||||
|
Loading…
Reference in New Issue
Block a user