mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
3d8b14e6f7
use require("/posix.js") to access them.
21 lines
492 B
JavaScript
21 lines
492 B
JavaScript
node.mixin(require("common.js"));
|
|
var got_error = false;
|
|
|
|
var filename = node.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);
|
|
});
|