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.
32 lines
589 B
32 lines
589 B
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var path = require('path');
|
|
var fs = require('fs');
|
|
var successes = 0;
|
|
|
|
var file = path.join(common.fixturesDir, 'a.js');
|
|
|
|
fs.open(file, 'a', 0o777, function(err, fd) {
|
|
if (err) throw err;
|
|
|
|
fs.fdatasyncSync(fd);
|
|
successes++;
|
|
|
|
fs.fsyncSync(fd);
|
|
successes++;
|
|
|
|
fs.fdatasync(fd, function(err) {
|
|
if (err) throw err;
|
|
successes++;
|
|
fs.fsync(fd, function(err) {
|
|
if (err) throw err;
|
|
successes++;
|
|
});
|
|
});
|
|
});
|
|
|
|
process.on('exit', function() {
|
|
assert.equal(4, successes);
|
|
});
|
|
|