|
@ -1,30 +1,27 @@ |
|
|
process.mixin(require("../common")); |
|
|
process.mixin(require("../common")); |
|
|
|
|
|
|
|
|
var got_error = false; |
|
|
var got_error = false, |
|
|
|
|
|
readdirDir = path.join(fixturesDir, "readdir") |
|
|
|
|
|
|
|
|
var files = ['a.js' |
|
|
var files = ['are' |
|
|
, 'b' |
|
|
, 'dir' |
|
|
, 'cycles' |
|
|
, 'empty' |
|
|
, 'echo.js' |
|
|
, 'files' |
|
|
, 'multipart.js' |
|
|
, 'for' |
|
|
, 'nested-index' |
|
|
, 'just' |
|
|
, 'print-chars.js' |
|
|
, 'testing.js' |
|
|
, 'test_ca.pem' |
|
|
, 'these' |
|
|
, 'test_cert.pem' |
|
|
|
|
|
, 'test_key.pem' |
|
|
|
|
|
, 'throws_error.js' |
|
|
|
|
|
, 'x.txt' |
|
|
|
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
puts('readdirSync ' + fixturesDir); |
|
|
puts('readdirSync ' + readdirDir); |
|
|
var f = fs.readdirSync(fixturesDir); |
|
|
var f = fs.readdirSync(readdirDir); |
|
|
p(f); |
|
|
p(f); |
|
|
assert.deepEqual(files, f.sort()); |
|
|
assert.deepEqual(files, f.sort()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
puts("readdir " + fixturesDir); |
|
|
puts("readdir " + readdirDir); |
|
|
fs.readdir(fixturesDir, function (err, f) { |
|
|
fs.readdir(readdirDir, function (err, f) { |
|
|
if (err) { |
|
|
if (err) { |
|
|
puts("error"); |
|
|
puts("error"); |
|
|
got_error = true; |
|
|
got_error = true; |
|
|