0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/simple/test-executable-path.js

22 lines
710 B
JavaScript

var common = require('../common');
var assert = require('assert');
var path = require('path');
var isDebug = (process.version.indexOf('debug') >= 0);
var debugPath = path.normalize(path.join(__dirname, '..', '..',
'build', 'debug', 'node_g'));
var defaultPath = path.normalize(path.join(__dirname, '..', '..',
'build', 'default', 'node'));
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);
}