mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
733 B
24 lines
733 B
var common = require('../common');
|
|
var assert = require('assert');
|
|
var fs = require('fs');
|
|
var spawn = require('child_process').spawn;
|
|
|
|
// Fails with EINVAL on SmartOS, EBUSY on Windows.
|
|
if (process.platform === 'sunos' || process.platform === 'win32') {
|
|
console.log('1..0 # Skipped: cannot rmdir current working directory');
|
|
return;
|
|
}
|
|
|
|
var dirname = common.tmpDir + '/cwd-does-not-exist-' + process.pid;
|
|
fs.mkdirSync(dirname);
|
|
process.chdir(dirname);
|
|
fs.rmdirSync(dirname);
|
|
|
|
var proc = spawn(process.execPath, ['-e', '0']);
|
|
proc.stdout.pipe(process.stdout);
|
|
proc.stderr.pipe(process.stderr);
|
|
|
|
proc.once('exit', common.mustCall(function(exitCode, signalCode) {
|
|
assert.equal(exitCode, 0);
|
|
assert.equal(signalCode, null);
|
|
}));
|
|
|