mirror of https://github.com/nodejs/node.git
parent
8b6277a460
commit
190abcac9d
|
@ -35,6 +35,12 @@ fs.mkdir(d, 0666, function(err) {
|
|||
console.log('mkdir error: ' + err.message);
|
||||
mkdir_error = true;
|
||||
} else {
|
||||
fs.mkdir(d, 0666, function(err) {
|
||||
console.log('expect EEXIST error: ', err);
|
||||
assert.ok(err.message.match(/^EEXIST/), 'got EEXIST message');
|
||||
assert.equal(err.code, 'EEXIST', 'got EEXIST code');
|
||||
assert.equal(err.path, d, 'got proper path for EEXIST');
|
||||
|
||||
console.log('mkdir okay!');
|
||||
fs.rmdir(d, function(err) {
|
||||
if (err) {
|
||||
|
@ -44,6 +50,7 @@ fs.mkdir(d, 0666, function(err) {
|
|||
console.log('rmdir okay!');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue