bug67647-mb.phpt 902 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly
  3. --EXTENSIONS--
  4. fileinfo
  5. --SKIPIF--
  6. <?php
  7. if (ini_get("default_charset") != "UTF-8") {
  8. die("skip require default_charset == UTF-8");
  9. }
  10. ?>
  11. --FILE--
  12. <?php
  13. $src = __DIR__ . DIRECTORY_SEPARATOR . "67647.mov";
  14. $f_base = "67647私はガラスを食べられます.mov";
  15. $f = __DIR__ . DIRECTORY_SEPARATOR . $f_base;
  16. /* Streams mb path support is tested a lot elsewhere. Copy the existing file
  17. therefore, avoid duplication in the repo. */
  18. if (!copy($src, $f) || empty(glob($f))) {
  19. die("failed to copy '$src' to '$f'");
  20. }
  21. $fi = new finfo(FILEINFO_MIME_TYPE);
  22. var_dump($fi->file($f));
  23. ?>
  24. +++DONE+++
  25. --CLEAN--
  26. <?php
  27. $f_base = "67647私はガラスを食べられます.mov";
  28. $f = __DIR__ . DIRECTORY_SEPARATOR . $f_base;
  29. unlink($f);
  30. ?>
  31. --EXPECT--
  32. string(15) "video/quicktime"
  33. +++DONE+++