Skip to content

Commit 894816b

Browse files
committed
skip for Windows
1 parent 37f0b35 commit 894816b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/oo_addfile.phpt

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ file_put_contents($del, 'foo');
3636
if (!$zip->addFile($del, 'deleted.txt', 0, 0, ZipArchive::FL_OPEN_FILE_NOW)) {
3737
echo "failed\n";
3838
}
39-
unlink($del);
39+
if (substr(PHP_OS, 0, 3) != 'WIN') {
40+
unlink($del);
41+
}
4042
var_dump($zip->lastId);
4143
if ($zip->status == ZIPARCHIVE::ER_OK) {
4244
dump_entries_name($zip);
@@ -52,6 +54,7 @@ var_dump(strlen($zip->getFromName('mini.txt')) == 34);
5254
var_dump(strlen($zip->getFromName('other.txt')) == filesize($dirname . 'utils.inc'));
5355
var_dump($zip->getFromName('deleted.txt') === "foo");
5456
@unlink($file);
57+
@unlink($del);
5558
?>
5659
--EXPECTF--
5760
int(-1)

0 commit comments

Comments
 (0)