2009-11-01 02:02:30 +08:00
|
|
|
process.mixin(require("./common"));
|
2009-06-29 01:05:58 +08:00
|
|
|
var got_error = false;
|
2009-06-01 18:56:28 +08:00
|
|
|
|
2009-11-01 02:02:30 +08:00
|
|
|
var filename = path.join(fixturesDir, "does_not_exist.txt");
|
2009-10-29 05:45:40 +08:00
|
|
|
var promise = posix.cat(filename, "raw");
|
2009-06-29 01:05:58 +08:00
|
|
|
|
2009-08-27 00:22:00 +08:00
|
|
|
promise.addCallback(function (content) {
|
2009-09-28 18:06:30 +08:00
|
|
|
debug("cat returned some content: " + content);
|
|
|
|
debug("this shouldn't happen as the file doesn't exist...");
|
2009-11-29 01:26:59 +08:00
|
|
|
assert.equal(true, false);
|
2009-08-27 00:22:00 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
promise.addErrback(function () {
|
|
|
|
got_error = true;
|
|
|
|
});
|
2009-06-01 18:56:28 +08:00
|
|
|
|
2009-08-27 00:51:04 +08:00
|
|
|
process.addListener("exit", function () {
|
2009-09-21 00:19:33 +08:00
|
|
|
puts("done");
|
2009-11-29 01:26:59 +08:00
|
|
|
assert.equal(true, got_error);
|
2009-08-27 00:51:04 +08:00
|
|
|
});
|