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.
 
 
 
 
 
 

25 lines
500 B

var common = require('../common');
var assert = require('assert');
var path = require('path'),
fs = require('fs');
var writeEndOk = false;
(function() {
debugger;
var file = path.join(common.tmpDir, 'write-end-test.txt');
var stream = fs.createWriteStream(file);
stream.end('a\n', 'utf8', function() {
var content = fs.readFileSync(file, 'utf8');
assert.equal(content, 'a\n');
writeEndOk = true;
});
})();
process.on('exit', function() {
assert.ok(writeEndOk);
});