Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Omitted volume not found warning if volume callback was specified.
. 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
- Loading branch information
cataphract
committed
Jun 2, 2010
1 parent
438d8a4
commit 9d49ce4
Showing
10 changed files
with
53 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,20 @@ | ||
--TEST-- | ||
RarArchive read_property handler invalid dimensions | ||
RarArchive has_property handler is given a closed archive | ||
--SKIPIF-- | ||
<?php if(!extension_loaded("rar")) print "skip"; ?> | ||
--FILE-- | ||
<?php | ||
|
||
//see also test #81 for broken archives | ||
|
||
$f1 = dirname(__FILE__) . "/latest_winrar.rar"; | ||
$a = RarArchive::open($f1); | ||
$a->close(); | ||
|
||
echo "* -1 (int):\n"; | ||
echo $a[-1]; | ||
|
||
echo "\n* -1 (string):\n"; | ||
echo $a["-1"]; | ||
|
||
echo "\n* -1 (double):\n"; | ||
echo $a[(float) -1]; | ||
|
||
echo "\n* 100:\n"; | ||
echo $a[100]; | ||
|
||
echo "\n* foo:\n"; | ||
echo $a["foo"]; | ||
|
||
echo "\n* 18446744073709551616 (string, 2^64):\n"; | ||
echo $a["18446744073709551616"]; | ||
|
||
echo "\n* -18446744073709551616 (string, -2^64):\n"; | ||
echo $a["-18446744073709551616"]; | ||
|
||
echo "\n* 18446744073709551616 (float, 2^64):\n"; | ||
echo $a[(float) 18446744073709551616]; | ||
var_dump(isset($a[0])); | ||
|
||
echo "\n"; | ||
echo "Done.\n"; | ||
--EXPECTF-- | ||
* -1 (int): | ||
|
||
Warning: main(): Dimension index must be non-negative, given -1 in %s on line %d | ||
|
||
* -1 (string): | ||
|
||
Warning: main(): Dimension index must be non-negative, given -1 in %s on line %d | ||
|
||
* -1 (double): | ||
|
||
Warning: main(): Dimension index must be non-negative, given -1 in %s on line %d | ||
|
||
* 100: | ||
|
||
Warning: main(): Dimension index exceeds or equals number of entries in RAR archive in %s on line %d | ||
|
||
* foo: | ||
|
||
Warning: main(): Attempt to use a non-numeric dimension to access a RarArchive object (invalid string) in %s on line %d | ||
|
||
* 18446744073709551616 (string, 2^64): | ||
|
||
Warning: main(): Dimension index is out of integer bounds in %s on line %d | ||
|
||
* -18446744073709551616 (string, -2^64): | ||
|
||
Warning: main(): Dimension index is out of integer bounds in %s on line %d | ||
|
||
* 18446744073709551616 (float, 2^64): | ||
|
||
Warning: main(): Dimension index is out of integer bounds in %s on line %d | ||
Warning: main(): The archive is already closed in %s on line %d | ||
bool(false) | ||
|
||
Done. |