Files
node-v0.x-archive/test/mjsunit/test-readdir.js
isaacs 4dcdfaf929 Fix require("../blah") issues
Added some more tests, and refactored the uri and path modules to use the
same normalization logic, so that nothing is relying on flaky regexps.

http://groups.google.com/group/nodejs/browse_thread/thread/34779f8c10098c5e
http://groups.google.com/group/nodejs/browse_thread/thread/1aa0146b92582679#msg_9822c03998cb4064
2009-12-22 17:22:12 +01:00

24 lines
536 B
JavaScript

process.mixin(require("./common"));
var got_error = false;
var promise = posix.readdir(fixturesDir);
puts("readdir " + fixturesDir);
promise.addCallback(function (files) {
p(files);
assert.deepEqual(["a.js", "b","cycles", "multipart.js",
"nested-index","test_ca.pem",
"test_cert.pem", "test_key.pem", "throws_error.js", "x.txt"], files.sort());
});
promise.addErrback(function () {
puts("error");
got_error = true;
});
process.addListener("exit", function () {
assert.equal(false, got_error);
puts("exit");
});