Skip to content

Commit

Permalink
Fix stat handler test for macintosh
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Nov 17, 2009
1 parent 0bf34b5 commit 6e6562e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/mjsunit/test-stat-handler.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
process.mixin(require("./common"));

var posix = require("posix");
var path = require("path");

var f = path.join(fixturesDir, "x.txt");
var f2 = path.join(fixturesDir, "x2.txt");

puts("watching for changes of " + f);

var changes = 0;
process.watchFile(f, function () {
puts(f + " change");
changes++;
process.unwatchFile(f);
});


setTimeout(function () {
posix.rename(f, f2).wait();
posix.rename(f2, f).wait();
process.unwatchFile(f);
}, 10);
var File = require("file").File;

var file = new File(f, 'w+');
file.write('xyz\n');
file.close().wait();


process.addListener("exit", function () {
Expand Down

0 comments on commit 6e6562e

Please sign in to comment.