summaryrefslogtreecommitdiff
path: root/test/parallel/test-cli-node-options.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-08-26 02:34:05 +0200
committerAnna Henningsen <anna@addaleax.net>2018-08-26 13:52:14 +0200
commit1c05b16c9e7b8d054d1661c61ae054efe83108ac (patch)
tree125d054e714e8db26a02919c95dfe795dbadc36a /test/parallel/test-cli-node-options.js
parente9876fd4f1b44381f28c61adfce45707f46eaef9 (diff)
downloadandroid-node-v8-1c05b16c9e7b8d054d1661c61ae054efe83108ac.tar.gz
android-node-v8-1c05b16c9e7b8d054d1661c61ae054efe83108ac.tar.bz2
android-node-v8-1c05b16c9e7b8d054d1661c61ae054efe83108ac.zip
src: fix NODE_OPTIONS parsing bug
I, uhm, might have messed up by using a `substr(start, end)` signature when `std::string` actually uses `substr(start, len)`. Fix that. Fixes: https://github.com/nodejs/node/issues/22526 Refs: https://github.com/nodejs/node/pull/22392 PR-URL: https://github.com/nodejs/node/pull/22529 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/parallel/test-cli-node-options.js')
-rw-r--r--test/parallel/test-cli-node-options.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
index d851f225fc..c7096a3acb 100644
--- a/test/parallel/test-cli-node-options.js
+++ b/test/parallel/test-cli-node-options.js
@@ -14,7 +14,9 @@ const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
process.chdir(tmpdir.path);
-expect(`-r ${require.resolve('../fixtures/printA.js')}`, 'A\nB\n');
+const printA = require.resolve('../fixtures/printA.js');
+expect(`-r ${printA}`, 'A\nB\n');
+expect(`-r ${printA} -r ${printA}`, 'A\nB\n');
expect('--no-deprecation', 'B\n');
expect('--no-warnings', 'B\n');
expect('--trace-warnings', 'B\n');
@@ -29,6 +31,9 @@ expect('--v8-pool-size=10', 'B\n');
expect('--trace-event-categories node', 'B\n');
// eslint-disable-next-line no-template-curly-in-string
expect('--trace-event-file-pattern {pid}-${rotation}.trace_events', 'B\n');
+// eslint-disable-next-line no-template-curly-in-string
+expect('--trace-event-file-pattern {pid}-${rotation}.trace_events ' +
+ '--trace-event-categories node.async_hooks', 'B\n');
if (!common.isWindows) {
expect('--perf-basic-prof', 'B\n');