Skip to content

Commit

Permalink
test: fix path to module for repl test on Windows
Browse files Browse the repository at this point in the history
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.

PR-URL: #3608
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
mcornac authored and rvagg committed Dec 4, 2015
1 parent 885edb4 commit 48e10c3
Showing 1 changed file with 6 additions and 2 deletions.
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.
if (common.isWindows)
buildPath = buildPath.replace(/\\/g, '/');
var cb_ran = false;

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

0 comments on commit 48e10c3

Please sign in to comment.