]> granicus.if.org Git - php/commitdiff
more fileinfo test fixes
authorAnatol Belski <ab@php.net>
Thu, 24 Nov 2016 13:48:33 +0000 (14:48 +0100)
committerAnatol Belski <ab@php.net>
Thu, 24 Nov 2016 13:48:33 +0000 (14:48 +0100)
Note the behavior change, FILEINFO_CONTINUE will now always
append a string \012-. I'm leaving this as is for now, as this is
the behavior change in libmagic.

ext/fileinfo/tests/finfo_file_basic.phpt
ext/fileinfo/tests/finfo_file_regex.phpt

index 84cf80d6d59ce6acff4573e7b611fc34ac05a214..c99695ef529a9a90573b15791191bdd183bfb8c5 100644 (file)
@@ -26,8 +26,8 @@ var_dump( finfo_file( $finfo, $magicFile.chr(0).$magicFile) );
 --EXPECTF--
 *** Testing finfo_file() : basic functionality ***
 string(28) "text/x-php; charset=us-ascii"
-string(22) "PHP script, ASCII text"
-string(25) "text/plain; charset=utf-8"
+string(32) "PHP script, ASCII text\012- data"
+string(40) "application/octet-stream; charset=binary"
 
 Warning: finfo_file(): Invalid path in %s%efinfo_file_basic.php on line %d
 bool(false)
index ee582b5c52b5e133abcc246306f52f63e10f4182..407280cf2af7fe1c04c67eb03582701466808cdd 100644 (file)
@@ -25,5 +25,5 @@ var_dump( finfo_file( $finfo, $file, FILEINFO_CONTINUE ) );
 --EXPECTF--
 *** Testing finfo_file() : regex rules ***
 string(28) "text/plain; charset=us-ascii"
-string(30) "awk or perl script, ASCII text"
+string(40) "awk or perl script, ASCII text\012- data"
 ===DONE===