Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: fix path to module for repl test on Windows
Use path join to construct the path instead of concatenating strings.
Replace backslash with double backslash so that they are escaped
correctly in the string passed to REPL.
  • Loading branch information
mcornac committed Nov 10, 2015
commit a2b7bf93145ec0dbee96b95534c6badc5a82e2fd
8 changes: 6 additions & 2 deletions test/addons/repl-domain-abort/test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
'use strict';
require('../../common');
var common = require('../../common');
var assert = require('assert');
var repl = require('repl');
var stream = require('stream');
var path = require('path');
var buildType = process.config.target_defaults.default_configuration;
var buildPath = __dirname + '/build/' + buildType + '/binding';
var buildPath = path.join(__dirname, 'build', buildType, 'binding');
// On Windows, escape backslashes in the path before passing it to REPL.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is wrong now. Don't worry, I'll update it when I land it. :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

if (common.isWindows)
buildPath = buildPath.replace(/\\/g, '/');
var cb_ran = false;

process.on('exit', function() {
Expand Down