Add test script for #57 (segfaults in drupal7)

This commit is contained in:
Xinchen Hui 2013-03-07 12:19:30 +08:00
parent b543511343
commit bc926f2fbb

38
tests/issue0057.phpt Normal file
View File

@ -0,0 +1,38 @@
--TEST--
ISSUE #57 (segfaults in drupal7)
--INI--
zend_optimizerplus.enable=1
zend_optimizerplus.enable_cli=1
zend_optimizerplus.optimization_level=-1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class ZException extends Exception {
}
function dummy($query) {
try {
switch ($query) {
case 1;
break;
case 2;
break;
default:
throw new Exception('exception');
}
} catch (ZException $e) {
return NULL;
}
}
try {
dummy(0);
} catch (Exception $e) {
echo $e->getMessage();
}
?>
--EXPECT--
exception