mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 15:06:33 +01:00
7a2e784ad7
API change summary: * require("/sys.js") becomes require("sys") * require("circle.js") becomes require("./circle") * process.path.join() becomes require("path").join()
21 lines
489 B
JavaScript
21 lines
489 B
JavaScript
process.mixin(require("./common"));
|
|
var got_error = false;
|
|
|
|
var filename = path.join(fixturesDir, "does_not_exist.txt");
|
|
var promise = posix.cat(filename, "raw");
|
|
|
|
promise.addCallback(function (content) {
|
|
debug("cat returned some content: " + content);
|
|
debug("this shouldn't happen as the file doesn't exist...");
|
|
assertTrue(false);
|
|
});
|
|
|
|
promise.addErrback(function () {
|
|
got_error = true;
|
|
});
|
|
|
|
process.addListener("exit", function () {
|
|
puts("done");
|
|
assertTrue(got_error);
|
|
});
|