mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
404 B
18 lines
404 B
14 years ago
|
var common = require('../common');
|
||
|
var assert = require('assert');
|
||
15 years ago
|
|
||
14 years ago
|
var path = require('path'),
|
||
|
fs = require('fs'),
|
||
|
fn = path.join(common.fixturesDir, 'empty.txt');
|
||
15 years ago
|
|
||
|
fs.readFile(fn, function(err, data) {
|
||
|
assert.ok(data);
|
||
15 years ago
|
});
|
||
15 years ago
|
|
||
|
fs.readFile(fn, 'utf8', function(err, data) {
|
||
|
assert.strictEqual('', data);
|
||
14 years ago
|
});
|
||
|
|
||
|
assert.ok(fs.readFileSync(fn));
|
||
|
assert.strictEqual('', fs.readFileSync(fn, 'utf8'));
|