diff options
author | Oleg Efimov <efimovov@gmail.com> | 2010-12-03 04:03:18 +0300 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-12-02 17:49:23 -0800 |
commit | c0d69a488380fb3cfc1fb257972730ad5c570ef9 (patch) | |
tree | 55c008f6c6713ec30401ced1c49dc5bebe1d1b74 /test/pummel/test-watch-file.js | |
parent | d3532a4bf294e9cbb7e6f6edec47477310dda14b (diff) | |
download | android-node-v8-c0d69a488380fb3cfc1fb257972730ad5c570ef9.tar.gz android-node-v8-c0d69a488380fb3cfc1fb257972730ad5c570ef9.tar.bz2 android-node-v8-c0d69a488380fb3cfc1fb257972730ad5c570ef9.zip |
GJSLint part of tests
Diffstat (limited to 'test/pummel/test-watch-file.js')
-rw-r--r-- | test/pummel/test-watch-file.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/pummel/test-watch-file.js b/test/pummel/test-watch-file.js index 8c594410ed..f949c13710 100644 --- a/test/pummel/test-watch-file.js +++ b/test/pummel/test-watch-file.js @@ -1,18 +1,18 @@ -common = require("../common"); +common = require('../common'); assert = common.assert -var fs = require("fs"); -var path = require("path"); +var fs = require('fs'); +var path = require('path'); -var f = path.join(common.fixturesDir, "x.txt"); -var f2 = path.join(common.fixturesDir, "x2.txt"); +var f = path.join(common.fixturesDir, 'x.txt'); +var f2 = path.join(common.fixturesDir, 'x2.txt'); -console.log("watching for changes of " + f); +console.log('watching for changes of ' + f); var changes = 0; function watchFile () { - fs.watchFile(f, function (curr, prev) { - console.log(f + " change"); + fs.watchFile(f, function(curr, prev) { + console.log(f + ' change'); changes++; assert.ok(curr.mtime != prev.mtime); fs.unwatchFile(f); @@ -24,10 +24,10 @@ function watchFile () { watchFile(); -var fd = fs.openSync(f, "w+"); +var fd = fs.openSync(f, 'w+'); fs.writeSync(fd, 'xyz\n'); fs.closeSync(fd); -process.addListener("exit", function () { +process.addListener('exit', function() { assert.ok(changes > 0); }); |