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.
22 lines
451 B
22 lines
451 B
14 years ago
|
var common = require('../common');
|
||
|
var assert = require('assert');
|
||
15 years ago
|
var fs = require('fs');
|
||
15 years ago
|
var N = 100;
|
||
|
var j = 0;
|
||
|
|
||
|
for (var i = 0; i < N; i++) {
|
||
15 years ago
|
// these files don't exist
|
||
14 years ago
|
fs.stat('does-not-exist-' + i, function(err) {
|
||
15 years ago
|
if (err) {
|
||
|
j++; // only makes it to about 17
|
||
14 years ago
|
console.log('finish ' + j);
|
||
15 years ago
|
} else {
|
||
14 years ago
|
throw new Error('this shouldn\'t be called');
|
||
15 years ago
|
}
|
||
15 years ago
|
});
|
||
15 years ago
|
}
|
||
|
|
||
13 years ago
|
process.on('exit', function() {
|
||
15 years ago
|
assert.equal(N, j);
|
||
|
});
|