From 2dba61f03612e8c1f40f2be2e97cccc25f01b995 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Tue, 14 Mar 2017 07:23:18 +0100 Subject: [PATCH 1/2] (Commandfile) add --tests option --- Commandfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Commandfile b/Commandfile index 63f8290..9000767 100644 --- a/Commandfile +++ b/Commandfile @@ -31,8 +31,11 @@ command 'build', command 'test', description: 'executes "make test"', + parameters: { + tests: { wrap: "TESTS=tests/%s", optional: true }, + }, 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 command 'shell', From 54e3a07bc8f6b4d5a2a44be8c6091f7b83a333b4 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Tue, 14 Mar 2017 07:26:54 +0100 Subject: [PATCH 2/2] make exception_start_column.phpt green again, closes #302 Test began to fail with V8 ~5.9.35 which started to report different column numbers of errors. Adapt test so it works well with older and newer versions of V8. --- tests/exception_start_column.phpt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/exception_start_column.phpt b/tests/exception_start_column.phpt index 682e290..9598bc1 100644 --- a/tests/exception_start_column.phpt +++ b/tests/exception_start_column.phpt @@ -6,15 +6,23 @@ Test V8::executeString() : Test getJsStartColumn on script exception executeString("print(blar());"); } -catch(V8JsScriptException $e) { - var_dump($e->getJsStartColumn()); +catch(V8JsScriptException $a) { } + +try { + $v8->executeString("(null); print(blar());"); } +catch(V8JsScriptException $b) { } + +var_dump($b->getJsStartColumn() - $a->getJsStartColumn()); ?> ===EOF=== --EXPECT-- -int(6) +int(8) ===EOF===