Skip to content

Commit eab66f9

Browse files
committed
remove dup of the binary file, rely on a test runtime copy instead
1 parent 2d6d1ec commit eab66f9

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed
Binary file not shown.

ext/fileinfo/tests/bug67647-mb.phpt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
11
--TEST--
22
Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly
33
--SKIPIF--
4-
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
4+
<?php
5+
require_once(dirname(__FILE__) . '/skipif.inc');
6+
7+
if (ini_get("default_charset") != "UTF-8") {
8+
die("skip require default_charset == UTF-8");
9+
}
10+
?>
511
--FILE--
612
<?php
713

8-
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647私はガラスを食べられます.mov";
14+
$src = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647.mov";
15+
16+
$f_base = "67647私はガラスを食べられます.mov";
17+
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base;
18+
19+
/* Streams mb path support is tested a lot elsewhere. Copy the existing file
20+
therefore, avoid duplication in the repo. */
21+
if (!copy($src, $f) || empty(glob($f))) {
22+
die("failed to copy '$src' to '$f'");
23+
}
924

1025
$fi = new finfo(FILEINFO_MIME_TYPE);
1126
var_dump($fi->file($f));
27+
1228
?>
1329
+++DONE+++
30+
--CLEAN--
31+
<?php
32+
$f_base = "67647私はガラスを食べられます.mov";
33+
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base;
34+
unlink($f);
35+
?>
1436
--EXPECT--
1537
string(15) "video/quicktime"
1638
+++DONE+++

0 commit comments

Comments
 (0)