mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 20:21:52 +00:00
Merge pull request #148 from stesie/test-fail-old-v8
skip extensions_error test for v8 version < 3.30
This commit is contained in:
commit
cdcfb973a7
@ -1,7 +1,24 @@
|
|||||||
--TEST--
|
--TEST--
|
||||||
Test V8::registerExtension() : Register extension with errors
|
Test V8::registerExtension() : Register extension with errors
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
<?php
|
||||||
|
require_once(dirname(__FILE__) . '/skipif.inc');
|
||||||
|
|
||||||
|
ob_start(NULL, 0, PHP_OUTPUT_HANDLER_CLEANABLE | PHP_OUTPUT_HANDLER_REMOVABLE);
|
||||||
|
phpinfo(INFO_MODULES);
|
||||||
|
$minfo = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
if(preg_match("/V8 Engine Linked Version => (.*)/", $minfo, $matches)) {
|
||||||
|
$version = explode('.', $matches[1]);
|
||||||
|
if($version[0] < 3 || ($version[0] == 3 && $version[1] < 30)) {
|
||||||
|
// old v8 version, has shorter error message and hence doesn't
|
||||||
|
// fit our EXCEPTF below
|
||||||
|
echo "skip";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user