mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-03-24 13:02:06 +01:00
. rar_broken_is omits no warnings (except the volume not found one, but see above) - Tests for reading broken files - Other tests for rararch.c git-svn-id: http://svn.php.net/repository/pecl/rar/trunk@300083 c90b9560-bf6c-de11-be94-00142212c4b1
37 lines
789 B
PHP
37 lines
789 B
PHP
--TEST--
|
|
rar_comment_get() function
|
|
--SKIPIF--
|
|
<?php if(!extension_loaded("rar")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$rar_file1 = rar_open(dirname(__FILE__).'/commented.rar');
|
|
var_export(rar_comment_get($rar_file1));
|
|
echo "\n";
|
|
var_export(rar_comment_get($rar_file1));
|
|
echo "\n";
|
|
var_export($rar_file1->getComment());
|
|
echo "\n";
|
|
|
|
$rar_file2 = rar_open(dirname(__FILE__).'/linux_rar.rar');
|
|
var_export(rar_comment_get($rar_file2));
|
|
echo "\n";
|
|
rar_close($rar_file2);
|
|
var_export(rar_comment_get($rar_file2));
|
|
echo "\n";
|
|
|
|
|
|
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
'This is the comment of the file commented.rar.'
|
|
'This is the comment of the file commented.rar.'
|
|
'This is the comment of the file commented.rar.'
|
|
NULL
|
|
|
|
Warning: rar_comment_get(): The archive is already closed in %s on line %d
|
|
false
|
|
Done
|