Skip to content

Commit

Permalink
fixup: add explicit test for GH 21918
Browse files Browse the repository at this point in the history
  • Loading branch information
joaocgreis committed Sep 1, 2018
1 parent 1154edc commit cf41cb0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/parallel/test-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,26 @@ childProcess.exec(
}
);

// test that preloading with a relative path works
process.chdir(fixtures.fixturesDir);
childProcess.exec(
`"${nodeBinary}" ${preloadOption(['./printA.js'])} "${fixtureB}"`,
common.mustCall(function(err, stdout, stderr) {
assert.ifError(err);
assert.strictEqual(stdout, 'A\nB\n');
})
);
if (common.isWindows) {
// https://github.com/nodejs/node/issues/21918
childProcess.exec(
`"${nodeBinary}" ${preloadOption(['.\\printA.js'])} "${fixtureB}"`,
common.mustCall(function(err, stdout, stderr) {
assert.ifError(err);
assert.strictEqual(stdout, 'A\nB\n');
})
);
}

// https://github.com/nodejs/node/issues/1691
process.chdir(fixtures.fixturesDir);
childProcess.exec(
Expand Down

0 comments on commit cf41cb0

Please sign in to comment.