Skip to content

Commit

Permalink
Added memory limit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoppanen committed Oct 4, 2013
1 parent 4bb2e4f commit e2f80e5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/023-php-allocators.phpt
@@ -0,0 +1,20 @@
--TEST--
Test PHP emalloc/erealloc/efree
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');

if (!Imagick::USE_ZEND_MM)
die ('skip Only active when compiled with --enable-imagick-zend-mm');
?>
--FILE--
<?php
ini_set ('memory_limit', '1M');

$im = new imagick ();
for ($i = 0; $i < 100; $i++)
$im->readImage ('magick:rose');


?>
--EXPECTF--
Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s on line %d

0 comments on commit e2f80e5

Please sign in to comment.