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