2014-11-22 11:56:00 +00:00
|
|
|
--TEST--
|
|
|
|
Test V8::executeString() : Test getJsStartColumn on script exception
|
|
|
|
--SKIPIF--
|
|
|
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$v8 = new V8Js();
|
|
|
|
|
2017-03-14 06:26:54 +00:00
|
|
|
// V8 started to return different start column numbers,
|
|
|
|
// hence let's do two errors and just look at the offset
|
|
|
|
|
2014-11-22 11:56:00 +00:00
|
|
|
try {
|
|
|
|
$v8->executeString("print(blar());");
|
|
|
|
}
|
2017-03-14 06:26:54 +00:00
|
|
|
catch(V8JsScriptException $a) { }
|
|
|
|
|
|
|
|
try {
|
|
|
|
$v8->executeString("(null); print(blar());");
|
2014-11-22 11:56:00 +00:00
|
|
|
}
|
2017-03-14 06:26:54 +00:00
|
|
|
catch(V8JsScriptException $b) { }
|
|
|
|
|
|
|
|
var_dump($b->getJsStartColumn() - $a->getJsStartColumn());
|
2014-11-22 11:56:00 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
===EOF===
|
|
|
|
--EXPECT--
|
2017-03-14 06:26:54 +00:00
|
|
|
int(8)
|
2014-11-22 11:56:00 +00:00
|
|
|
===EOF===
|