node/test/test-file-open.js

16 lines
357 B
JavaScript
Raw Normal View History

include("mjsunit");
var assert_count = 0;
2009-04-21 22:30:47 +08:00
function onLoad () {
var dirname = node.path.dirname(__filename);
var fixtures = node.path.join(dirname, "fixtures");
var x = node.path.join(fixtures, "x.txt");
2009-05-21 18:49:41 +08:00
file = new node.fs.File;
file.open(x, "r", function (status) {
assertTrue(status == 0);
assert_count += 1;
file.close();
});
};