blob: c731b96ad8ed99c316fbdebbc7204e07fcc7002c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
var common = require('../common');
var assert = require('assert');
var path = require('path');
var fs = require('fs');
var dirname = path.dirname(__filename);
var d = path.join(common.tmpDir, 'dir');
var mkdir_error = false;
var rmdir_error = false;
fs.mkdir(d, 0666, function(err) {
if (err) {
console.log('mkdir error: ' + err.message);
mkdir_error = true;
} else {
console.log('mkdir okay!');
fs.rmdir(d, function(err) {
if (err) {
console.log('rmdir error: ' + err.message);
rmdir_error = true;
} else {
console.log('rmdir okay!');
}
});
}
});
process.addListener('exit', function() {
assert.equal(false, mkdir_error);
assert.equal(false, rmdir_error);
console.log('exit');
});
|