mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-05 10:41:51 +00:00
commit
37ffdc6379
@ -31,8 +31,11 @@ command 'build',
|
|||||||
|
|
||||||
command 'test',
|
command 'test',
|
||||||
description: 'executes "make test"',
|
description: 'executes "make test"',
|
||||||
|
parameters: {
|
||||||
|
tests: { wrap: "TESTS=tests/%s", optional: true },
|
||||||
|
},
|
||||||
script: <<-eof
|
script: <<-eof
|
||||||
cd /data/build; `which gmake || which make` test NO_INTERACTION=1 REPORT_EXIT_STATUS=1
|
cd /data/build; `which gmake || which make` test %{tests} NO_INTERACTION=1 REPORT_EXIT_STATUS=1
|
||||||
eof
|
eof
|
||||||
|
|
||||||
command 'shell',
|
command 'shell',
|
||||||
|
@ -6,15 +6,23 @@ Test V8::executeString() : Test getJsStartColumn on script exception
|
|||||||
<?php
|
<?php
|
||||||
$v8 = new V8Js();
|
$v8 = new V8Js();
|
||||||
|
|
||||||
|
// V8 started to return different start column numbers,
|
||||||
|
// hence let's do two errors and just look at the offset
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$v8->executeString("print(blar());");
|
$v8->executeString("print(blar());");
|
||||||
}
|
}
|
||||||
catch(V8JsScriptException $e) {
|
catch(V8JsScriptException $a) { }
|
||||||
var_dump($e->getJsStartColumn());
|
|
||||||
|
try {
|
||||||
|
$v8->executeString("(null); print(blar());");
|
||||||
}
|
}
|
||||||
|
catch(V8JsScriptException $b) { }
|
||||||
|
|
||||||
|
var_dump($b->getJsStartColumn() - $a->getJsStartColumn());
|
||||||
|
|
||||||
?>
|
?>
|
||||||
===EOF===
|
===EOF===
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
int(6)
|
int(8)
|
||||||
===EOF===
|
===EOF===
|
||||||
|
Loading…
Reference in New Issue
Block a user