Browse Source

Fix test-executable-path.js

Now that process.version doesn't say if the build is debug or not.
v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
c926ab7746
  1. 21
      test/simple/test-executable-path.js

21
test/simple/test-executable-path.js

@ -1,20 +1,19 @@
common = require("../common");
assert = common.assert
assert = common.assert;
path = require("path");
isDebug = (process.version.indexOf('debug') >= 0);
nodePath = path.join(__dirname,
"..",
"..",
"build",
isDebug ? 'debug' : 'default',
isDebug ? 'node_g' : 'node');
nodePath = path.normalize(nodePath);
debugPath = path.normalize(path.join(__dirname, '..', '..', 'build', 'debug', 'node_g'));
defaultPath = path.normalize(path.join(__dirname, '..', '..', 'build', 'default', 'node'));
console.log('nodePath: ' + nodePath);
console.log('debugPath: ' + debugPath);
console.log('defaultPath: ' + defaultPath);
console.log('process.execPath: ' + process.execPath);
if (/node_g$/.test(process.execPath)) {
assert.equal(debugPath, process.execPath);
} else {
assert.equal(defaultPath, process.execPath);
}
assert.equal(nodePath, process.execPath);

Loading…
Cancel
Save