|
|
@ -2,13 +2,7 @@ process.mixin(require("./common")); |
|
|
|
|
|
|
|
var got_error = false; |
|
|
|
|
|
|
|
fs.readdir(fixturesDir, function (err, files) { |
|
|
|
if (err) { |
|
|
|
puts("error"); |
|
|
|
got_error = true; |
|
|
|
} else { |
|
|
|
p(files); |
|
|
|
assert.deepEqual(['a.js' |
|
|
|
var files = ['a.js' |
|
|
|
, 'b' |
|
|
|
, 'cycles' |
|
|
|
, 'echo.js' |
|
|
@ -20,10 +14,25 @@ fs.readdir(fixturesDir, function (err, files) { |
|
|
|
, 'test_key.pem' |
|
|
|
, 'throws_error.js' |
|
|
|
, 'x.txt' |
|
|
|
], files.sort()); |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
puts('readdirSync ' + fixturesDir); |
|
|
|
var f = fs.readdirSync(fixturesDir); |
|
|
|
p(f); |
|
|
|
assert.deepEqual(files, f.sort()); |
|
|
|
|
|
|
|
|
|
|
|
puts("readdir " + fixturesDir); |
|
|
|
fs.readdir(fixturesDir, function (err, f) { |
|
|
|
if (err) { |
|
|
|
puts("error"); |
|
|
|
got_error = true; |
|
|
|
} else { |
|
|
|
p(f); |
|
|
|
assert.deepEqual(files, f.sort()); |
|
|
|
} |
|
|
|
}); |
|
|
|
puts("readdir " + fixturesDir); |
|
|
|
|
|
|
|
process.addListener("exit", function () { |
|
|
|
assert.equal(false, got_error); |
|
|
|