Sha256: d2733aefc04742ee86615b8ac031694b663352cf0630395688ecec92c875976a

Contents?: true

Size: 572 Bytes

Versions: 3

Compression:

Stored size: 572 Bytes

Contents

common = require("../common");
assert = common.assert
var path = require('path');
var fs = require('fs');
var got_error = false;

var filename = path.join(common.fixturesDir, "does_not_exist.txt");
fs.readFile(filename, "raw", function (err, content) {
  if (err) {
    got_error = true;
  } else {
    common.debug("cat returned some content: " + content);
    common.debug("this shouldn't happen as the file doesn't exist...");
    assert.equal(true, false);
  }
});

process.addListener("exit", function () {
  console.log("done");
  assert.equal(true, got_error);
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rednode-0.1.2 ext/node/test/simple/test-file-read-noexist.js
rednode-0.1.1 ext/node/test/simple/test-file-read-noexist.js
rednode-0.1.0 ext/node/test/simple/test-file-read-noexist.js