summaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorRoman Reiss <me@silverwind.io>2015-05-19 13:00:06 +0200
committerRoman Reiss <me@silverwind.io>2015-05-19 21:21:27 +0200
commitf29762f4dd5811464684f820286f1c90a694bdff (patch)
tree67ba73a81c3938f41796dfa4c595f9713de59933 /test/sequential
parent85d99830096a48b7d50cc3b0e5c3fba4172c2d02 (diff)
downloadandroid-node-v8-f29762f4dd5811464684f820286f1c90a694bdff.tar.gz
android-node-v8-f29762f4dd5811464684f820286f1c90a694bdff.tar.bz2
android-node-v8-f29762f4dd5811464684f820286f1c90a694bdff.zip
test: enable linting for tests
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/sequential')
-rw-r--r--test/sequential/test-chdir.js4
-rw-r--r--test/sequential/test-child-process-emfile.js1
-rw-r--r--test/sequential/test-child-process-execsync.js4
-rw-r--r--test/sequential/test-child-process-fork-getconnections.js1
-rw-r--r--test/sequential/test-cluster-listening-port.js1
-rw-r--r--test/sequential/test-debug-args.js1
-rw-r--r--test/sequential/test-deprecation-flags.js4
-rw-r--r--test/sequential/test-force-repl.js1
-rw-r--r--test/sequential/test-fs-watch-recursive.js3
-rw-r--r--test/sequential/test-fs-watch.js7
-rw-r--r--test/sequential/test-http-pipeline-flood.js1
-rw-r--r--test/sequential/test-init.js1
-rw-r--r--test/sequential/test-memory-usage-emfile.js1
-rw-r--r--test/sequential/test-mkdir-rmdir.js5
-rw-r--r--test/sequential/test-module-loading.js7
-rw-r--r--test/sequential/test-net-GH-5504.js1
-rw-r--r--test/sequential/test-net-listen-exclusive-random-ports.js1
-rw-r--r--test/sequential/test-net-localport.js3
-rw-r--r--test/sequential/test-net-server-address.js13
-rw-r--r--test/sequential/test-net-server-bind.js1
-rw-r--r--test/sequential/test-next-tick-error-spin.js15
-rw-r--r--test/sequential/test-pipe-address.js1
-rw-r--r--test/sequential/test-pipe-head.js1
-rw-r--r--test/sequential/test-pipe-stream.js1
-rw-r--r--test/sequential/test-pipe-unref.js1
-rw-r--r--test/sequential/test-pipe.js1
-rw-r--r--test/sequential/test-pump-file2tcp-noexist.js1
-rw-r--r--test/sequential/test-pump-file2tcp.js1
-rw-r--r--test/sequential/test-readdir.js1
-rw-r--r--test/sequential/test-regress-GH-1531.js1
-rw-r--r--test/sequential/test-regress-GH-1697.js3
-rw-r--r--test/sequential/test-regress-GH-1726.js3
-rw-r--r--test/sequential/test-regress-GH-1899.js1
-rw-r--r--test/sequential/test-regress-GH-3542.js5
-rw-r--r--test/sequential/test-regress-GH-3739.js1
-rw-r--r--test/sequential/test-regress-GH-4015.js1
-rw-r--r--test/sequential/test-regress-GH-4027.js1
-rw-r--r--test/sequential/test-regress-GH-4948.js8
-rw-r--r--test/sequential/test-regress-GH-746.js1
-rw-r--r--test/sequential/test-regress-GH-784.js1
-rw-r--r--test/sequential/test-regress-GH-819.js1
-rw-r--r--test/sequential/test-regress-GH-877.js1
-rw-r--r--test/sequential/test-require-cache-without-stat.js1
-rw-r--r--test/sequential/test-setproctitle.js1
-rw-r--r--test/sequential/test-sigint-infinite-loop.js1
-rw-r--r--test/sequential/test-socket-write-after-fin-error.js3
-rw-r--r--test/sequential/test-socket-write-after-fin.js3
-rw-r--r--test/sequential/test-stdin-child-proc.js1
-rw-r--r--test/sequential/test-stdin-from-file.js1
-rw-r--r--test/sequential/test-stdin-pipe-resume.js1
-rw-r--r--test/sequential/test-stdin-script-child.js1
-rw-r--r--test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js1
-rw-r--r--test/sequential/test-stdout-close-catch.js1
-rw-r--r--test/sequential/test-stdout-stderr-reading.js1
-rw-r--r--test/sequential/test-stdout-to-file.js1
-rw-r--r--test/sequential/test-stream2-fs.js5
-rw-r--r--test/sequential/test-stream2-httpclient-response-end.js1
-rw-r--r--test/sequential/test-stream2-stderr-sync.js1
-rw-r--r--test/sequential/test-sync-fileread.js1
-rw-r--r--test/sequential/test-tcp-wrap-connect.js1
-rw-r--r--test/sequential/test-tcp-wrap-listen.js1
-rw-r--r--test/sequential/test-tls-honorcipherorder.js1
-rw-r--r--test/sequential/test-util-debug.js1
-rw-r--r--test/sequential/test-vm-syntax-error-stderr.js1
-rw-r--r--test/sequential/test-vm-timeout-rethrow.js3
-rw-r--r--test/sequential/test-zerolengthbufferbug.js1
66 files changed, 108 insertions, 38 deletions
diff --git a/test/sequential/test-chdir.js b/test/sequential/test-chdir.js
index a24753de2d..0fab45cb0c 100644
--- a/test/sequential/test-chdir.js
+++ b/test/sequential/test-chdir.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var fs = require('fs');
@@ -20,4 +21,5 @@ fs.rmdirSync(dir);
assert.throws(function() { process.chdir({}); }, TypeError, 'Bad argument.');
assert.throws(function() { process.chdir(); }, TypeError, 'Bad argument.');
-assert.throws(function() { process.chdir("x", "y"); }, TypeError, 'Bad argument.');
+assert.throws(function() { process.chdir('x', 'y'); },
+ TypeError, 'Bad argument.');
diff --git a/test/sequential/test-child-process-emfile.js b/test/sequential/test-child-process-emfile.js
index 66be12749c..964b63a2b4 100644
--- a/test/sequential/test-child-process-emfile.js
+++ b/test/sequential/test-child-process-emfile.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;
diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js
index 5cd9ee433d..13982e00a6 100644
--- a/test/sequential/test-child-process-execsync.js
+++ b/test/sequential/test-child-process-execsync.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var util = require('util');
@@ -58,7 +59,8 @@ assert.deepEqual(ret, msgBuf);
ret = execFileSync(process.execPath, args, { encoding: 'utf8' });
-assert.strictEqual(ret, msg + '\n', 'execFileSync encoding result should match');
+assert.strictEqual(ret, msg + '\n',
+ 'execFileSync encoding result should match');
// Verify that the cwd option works - GH #7824
(function() {
diff --git a/test/sequential/test-child-process-fork-getconnections.js b/test/sequential/test-child-process-fork-getconnections.js
index 6848b2ffa0..a587713b61 100644
--- a/test/sequential/test-child-process-fork-getconnections.js
+++ b/test/sequential/test-child-process-fork-getconnections.js
@@ -1,3 +1,4 @@
+'use strict';
var assert = require('assert');
var common = require('../common');
var fork = require('child_process').fork;
diff --git a/test/sequential/test-cluster-listening-port.js b/test/sequential/test-cluster-listening-port.js
index 5d68b066cf..eb8a974d04 100644
--- a/test/sequential/test-cluster-listening-port.js
+++ b/test/sequential/test-cluster-listening-port.js
@@ -1,3 +1,4 @@
+'use strict';
var assert = require('assert');
var cluster = require('cluster');
var net = require('net');
diff --git a/test/sequential/test-debug-args.js b/test/sequential/test-debug-args.js
index 7aaef76a64..eb1533d441 100644
--- a/test/sequential/test-debug-args.js
+++ b/test/sequential/test-debug-args.js
@@ -1,3 +1,4 @@
+'use strict';
// Flags: --debugger
var common = require('../common');
diff --git a/test/sequential/test-deprecation-flags.js b/test/sequential/test-deprecation-flags.js
index 2af60a1736..e8565a3363 100644
--- a/test/sequential/test-deprecation-flags.js
+++ b/test/sequential/test-deprecation-flags.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var execFile = require('child_process').execFile;
@@ -12,7 +13,8 @@ execFile(node, normal, function(er, stdout, stderr) {
console.error('normal: show deprecation warning');
assert.equal(er, null);
assert.equal(stdout, '');
- assert.equal(stderr, 'util.p: Use console.error() instead\n\'This is deprecated\'\n');
+ assert.equal(stderr,
+ 'util.p: Use console.error() instead\n\'This is deprecated\'\n');
console.log('normal ok');
});
diff --git a/test/sequential/test-force-repl.js b/test/sequential/test-force-repl.js
index c0ad1484ff..5907dc2019 100644
--- a/test/sequential/test-force-repl.js
+++ b/test/sequential/test-force-repl.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;
diff --git a/test/sequential/test-fs-watch-recursive.js b/test/sequential/test-fs-watch-recursive.js
index a789dcb306..f77b86e436 100644
--- a/test/sequential/test-fs-watch-recursive.js
+++ b/test/sequential/test-fs-watch-recursive.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
@@ -23,7 +24,7 @@ if (process.platform === 'darwin') {
try { fs.rmdirSync(testsubdir); } catch (e) { }
};
- try { fs.mkdirSync(testsubdir, 0700); } catch (e) {}
+ try { fs.mkdirSync(testsubdir, 0o700); } catch (e) {}
assert.doesNotThrow(function() {
var watcher = fs.watch(testDir, {recursive: true});
diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js
index d92a10cd80..1cfaad9b3e 100644
--- a/test/sequential/test-fs-watch.js
+++ b/test/sequential/test-fs-watch.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
@@ -41,7 +42,7 @@ fs.writeFileSync(filepathOne, 'hello');
assert.doesNotThrow(
function() {
- var watcher = fs.watch(filepathOne)
+ var watcher = fs.watch(filepathOne);
watcher.on('change', function(event, filename) {
assert.equal('change', event);
@@ -82,7 +83,7 @@ setTimeout(function() {
}, 20);
try { fs.unlinkSync(filepathThree); } catch (e) {}
-try { fs.mkdirSync(testsubdir, 0700); } catch (e) {}
+try { fs.mkdirSync(testsubdir, 0o700); } catch (e) {}
assert.doesNotThrow(
function() {
@@ -123,7 +124,7 @@ assert.throws(function() {
oldhandle.close(); // clean up
assert.throws(function() {
- var w = fs.watchFile(__filename, {persistent:false}, function(){});
+ var w = fs.watchFile(__filename, {persistent:false}, function() {});
oldhandle = w._handle;
w._handle = { stop: w._handle.stop };
w.stop();
diff --git a/test/sequential/test-http-pipeline-flood.js b/test/sequential/test-http-pipeline-flood.js
index 6eeb785f9c..cb9fc97a86 100644
--- a/test/sequential/test-http-pipeline-flood.js
+++ b/test/sequential/test-http-pipeline-flood.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-init.js b/test/sequential/test-init.js
index abc6378a63..f68c001f64 100644
--- a/test/sequential/test-init.js
+++ b/test/sequential/test-init.js
@@ -1,3 +1,4 @@
+'use strict';
(function() {
var assert = require('assert'),
child = require('child_process'),
diff --git a/test/sequential/test-memory-usage-emfile.js b/test/sequential/test-memory-usage-emfile.js
index e95fe429c3..e4f85488f4 100644
--- a/test/sequential/test-memory-usage-emfile.js
+++ b/test/sequential/test-memory-usage-emfile.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-mkdir-rmdir.js b/test/sequential/test-mkdir-rmdir.js
index 63dc78df38..7bd156419e 100644
--- a/test/sequential/test-mkdir-rmdir.js
+++ b/test/sequential/test-mkdir-rmdir.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
@@ -9,12 +10,12 @@ var d = path.join(common.tmpDir, 'dir');
var mkdir_error = false;
var rmdir_error = false;
-fs.mkdir(d, 0666, function(err) {
+fs.mkdir(d, 0o666, function(err) {
if (err) {
console.log('mkdir error: ' + err.message);
mkdir_error = true;
} else {
- fs.mkdir(d, 0666, function(err) {
+ fs.mkdir(d, 0o666, function(err) {
console.log('expect EEXIST error: ', err);
assert.ok(err.message.match(/^EEXIST/), 'got EEXIST message');
assert.equal(err.code, 'EEXIST', 'got EEXIST code');
diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js
index c1d8df4553..dfca2e4202 100644
--- a/test/sequential/test-module-loading.js
+++ b/test/sequential/test-module-loading.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
@@ -53,7 +54,7 @@ assert.equal('D', d3.D());
assert.equal(true, common.indirectInstanceOf(d4.D, Function));
assert.equal('D', d4.D());
-assert.ok((new a.SomeClass) instanceof c.SomeClass);
+assert.ok((new a.SomeClass()) instanceof c.SomeClass);
common.debug('test index.js modules ids and relative loading');
var one = require('../fixtures/nested-index/one'),
@@ -89,7 +90,7 @@ common.debug('test name clashes');
var my_path = require('../fixtures/path');
assert.ok(common.indirectInstanceOf(my_path.path_func, Function));
// this one does not exist and should throw
-assert.throws(function() { require('./utils')});
+assert.throws(function() { require('./utils'); });
var errorThrown = false;
try {
@@ -187,7 +188,7 @@ assert.deepEqual(json, {
// the appropriate children, and so on.
var children = module.children.reduce(function red(set, child) {
- var id = path.relative(path.dirname(__dirname), child.id)
+ var id = path.relative(path.dirname(__dirname), child.id);
id = id.replace(/\\/g, '/');
set[id] = child.children.reduce(red, {});
return set;
diff --git a/test/sequential/test-net-GH-5504.js b/test/sequential/test-net-GH-5504.js
index 2ee0a1d86d..0478de55d6 100644
--- a/test/sequential/test-net-GH-5504.js
+++ b/test/sequential/test-net-GH-5504.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-net-listen-exclusive-random-ports.js b/test/sequential/test-net-listen-exclusive-random-ports.js
index 2922a2b06e..c32273a59b 100644
--- a/test/sequential/test-net-listen-exclusive-random-ports.js
+++ b/test/sequential/test-net-listen-exclusive-random-ports.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var cluster = require('cluster');
diff --git a/test/sequential/test-net-localport.js b/test/sequential/test-net-localport.js
index 239196813a..09b6627c79 100644
--- a/test/sequential/test-net-localport.js
+++ b/test/sequential/test-net-localport.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
@@ -17,4 +18,4 @@ var server = net.createServer(function(socket) {
}).on('connect', function() {
assert.strictEqual(client.localPort, common.PORT + 1);
});
-})
+});
diff --git a/test/sequential/test-net-server-address.js b/test/sequential/test-net-server-address.js
index 717d46f1bb..1e91c348ef 100644
--- a/test/sequential/test-net-server-address.js
+++ b/test/sequential/test-net-server-address.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
@@ -60,12 +61,12 @@ server1.listen(common.PORT, function() {
// Test without hostname or port
var server2 = net.createServer();
-server2.on('error', function (e) {
+server2.on('error', function(e) {
console.log('Error on ip socket: ' + e.toString());
});
// Don't specify the port number
-server2.listen(function () {
+server2.listen(function() {
var address = server2.address();
assert.strictEqual(address.address, anycast_ipv6);
assert.strictEqual(address.family, family_ipv6);
@@ -75,12 +76,12 @@ server2.listen(function () {
// Test without hostname, but with a false-y port
var server3 = net.createServer();
-server3.on('error', function (e) {
+server3.on('error', function(e) {
console.log('Error on ip socket: ' + e.toString());
});
// Specify a false-y port number
-server3.listen(0, function () {
+server3.listen(0, function() {
var address = server3.address();
assert.strictEqual(address.address, anycast_ipv6);
assert.strictEqual(address.family, family_ipv6);
@@ -90,12 +91,12 @@ server3.listen(0, function () {
// Test without hostname, but with port -1
var server4 = net.createServer();
-server4.on('error', function (e) {
+server4.on('error', function(e) {
console.log('Error on ip socket: ' + e.toString());
});
// Specify -1 as port number
-server4.listen(-1, function () {
+server4.listen(-1, function() {
var address = server4.address();
assert.strictEqual(address.address, anycast_ipv6);
assert.strictEqual(address.family, family_ipv6);
diff --git a/test/sequential/test-net-server-bind.js b/test/sequential/test-net-server-bind.js
index 3a7cd0e15b..c77341418c 100644
--- a/test/sequential/test-net-server-bind.js
+++ b/test/sequential/test-net-server-bind.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
diff --git a/test/sequential/test-next-tick-error-spin.js b/test/sequential/test-next-tick-error-spin.js
index a150ea7a58..7a76ab1e12 100644
--- a/test/sequential/test-next-tick-error-spin.js
+++ b/test/sequential/test-next-tick-error-spin.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
@@ -22,24 +23,24 @@ if (process.argv[2] !== 'child') {
// in the error handler, we trigger several MakeCallback events
d.on('error', function(e) {
- console.log('a')
- console.log('b')
- console.log('c')
- console.log('d')
- console.log('e')
+ console.log('a');
+ console.log('b');
+ console.log('c');
+ console.log('d');
+ console.log('e');
f();
});
function f() {
process.nextTick(function() {
d.run(function() {
- throw(new Error('x'));
+ throw new Error('x');
});
});
}
f();
- setTimeout(function () {
+ setTimeout(function() {
console.error('broke in!');
//process.stdout.close();
//process.stderr.close();
diff --git a/test/sequential/test-pipe-address.js b/test/sequential/test-pipe-address.js
index 6497eb7f12..b9e544e974 100644
--- a/test/sequential/test-pipe-address.js
+++ b/test/sequential/test-pipe-address.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
diff --git a/test/sequential/test-pipe-head.js b/test/sequential/test-pipe-head.js
index 4fa3eaa4da..ac8b165151 100644
--- a/test/sequential/test-pipe-head.js
+++ b/test/sequential/test-pipe-head.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-pipe-stream.js b/test/sequential/test-pipe-stream.js
index 5e5837b298..ba4005e9e0 100644
--- a/test/sequential/test-pipe-stream.js
+++ b/test/sequential/test-pipe-stream.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
diff --git a/test/sequential/test-pipe-unref.js b/test/sequential/test-pipe-unref.js
index 53853b9bdc..4580f2a66e 100644
--- a/test/sequential/test-pipe-unref.js
+++ b/test/sequential/test-pipe-unref.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-pipe.js b/test/sequential/test-pipe.js
index 11ea83b884..2ef19c37ea 100644
--- a/test/sequential/test-pipe.js
+++ b/test/sequential/test-pipe.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var http = require('http');
diff --git a/test/sequential/test-pump-file2tcp-noexist.js b/test/sequential/test-pump-file2tcp-noexist.js
index 8b2057e533..1ffdb5d461 100644
--- a/test/sequential/test-pump-file2tcp-noexist.js
+++ b/test/sequential/test-pump-file2tcp-noexist.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
diff --git a/test/sequential/test-pump-file2tcp.js b/test/sequential/test-pump-file2tcp.js
index 50b576771f..86effb7c6c 100644
--- a/test/sequential/test-pump-file2tcp.js
+++ b/test/sequential/test-pump-file2tcp.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
diff --git a/test/sequential/test-readdir.js b/test/sequential/test-readdir.js
index bba28d0d7a..4987dc1848 100644
--- a/test/sequential/test-readdir.js
+++ b/test/sequential/test-readdir.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
diff --git a/test/sequential/test-regress-GH-1531.js b/test/sequential/test-regress-GH-1531.js
index 9e1b8e3077..0d06cc3485 100644
--- a/test/sequential/test-regress-GH-1531.js
+++ b/test/sequential/test-regress-GH-1531.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-regress-GH-1697.js b/test/sequential/test-regress-GH-1697.js
index 18d1829174..ff5754f357 100644
--- a/test/sequential/test-regress-GH-1697.js
+++ b/test/sequential/test-regress-GH-1697.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var net = require('net'),
cp = require('child_process'),
@@ -39,7 +40,7 @@ if (process.argv[2] === 'server') {
// Block the event loop for 1 second
var start = (new Date()).getTime();
- while ((new Date).getTime() < start + 1000) {}
+ while ((new Date()).getTime() < start + 1000) {}
client.write(alittle);
diff --git a/test/sequential/test-regress-GH-1726.js b/test/sequential/test-regress-GH-1726.js
index 74578ab4e0..859ab6cc5e 100644
--- a/test/sequential/test-regress-GH-1726.js
+++ b/test/sequential/test-regress-GH-1726.js
@@ -1,3 +1,4 @@
+'use strict';
// Open a chain of five Node processes each a child of the next. The final
// process exits immediately. Each process in the chain is instructed to
// exit when its child exits.
@@ -26,7 +27,7 @@ assert.ok(!child.stderr);
console.error('gen=%d, pid=%d', gen, process.pid);
/*
-var timer = setTimeout(function () {
+var timer = setTimeout(function() {
throw new Error('timeout! gen='+gen);
}, 1000);
*/
diff --git a/test/sequential/test-regress-GH-1899.js b/test/sequential/test-regress-GH-1899.js
index 8663eb5a4d..98396aae13 100644
--- a/test/sequential/test-regress-GH-1899.js
+++ b/test/sequential/test-regress-GH-1899.js
@@ -1,3 +1,4 @@
+'use strict';
var path = require('path');
var assert = require('assert');
var spawn = require('child_process').spawn;
diff --git a/test/sequential/test-regress-GH-3542.js b/test/sequential/test-regress-GH-3542.js
index 32b3433318..80f2a4c9c3 100644
--- a/test/sequential/test-regress-GH-3542.js
+++ b/test/sequential/test-regress-GH-3542.js
@@ -1,3 +1,4 @@
+'use strict';
// This test is only relevant on Windows.
if (process.platform !== 'win32') {
return process.exit(0);
@@ -22,8 +23,8 @@ function test(p) {
test('//localhost/c$/windows/system32');
test('//localhost/c$/windows');
-test('//localhost/c$/')
-test('\\\\localhost\\c$')
+test('//localhost/c$/');
+test('\\\\localhost\\c$');
test('c:\\');
test('c:');
test(process.env.windir);
diff --git a/test/sequential/test-regress-GH-3739.js b/test/sequential/test-regress-GH-3739.js
index d08cfce602..cc16b22dc4 100644
--- a/test/sequential/test-regress-GH-3739.js
+++ b/test/sequential/test-regress-GH-3739.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common'),
assert = require('assert'),
fs = require('fs'),
diff --git a/test/sequential/test-regress-GH-4015.js b/test/sequential/test-regress-GH-4015.js
index 38a77c8208..7f0e03f9ac 100644
--- a/test/sequential/test-regress-GH-4015.js
+++ b/test/sequential/test-regress-GH-4015.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var exec = require('child_process').exec;
diff --git a/test/sequential/test-regress-GH-4027.js b/test/sequential/test-regress-GH-4027.js
index de2dff180d..da91be95b8 100644
--- a/test/sequential/test-regress-GH-4027.js
+++ b/test/sequential/test-regress-GH-4027.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
diff --git a/test/sequential/test-regress-GH-4948.js b/test/sequential/test-regress-GH-4948.js
index e78870b704..c87ade9850 100644
--- a/test/sequential/test-regress-GH-4948.js
+++ b/test/sequential/test-regress-GH-4948.js
@@ -1,10 +1,11 @@
+'use strict';
// https://github.com/joyent/node/issues/4948
var common = require('../common');
var http = require('http');
var reqCount = 0;
-var server = http.createServer(function(serverReq, serverRes){
+var server = http.createServer(function(serverReq, serverRes) {
if (reqCount) {
serverRes.end();
server.close();
@@ -15,9 +16,10 @@ var server = http.createServer(function(serverReq, serverRes){
// normally the use case would be to call an external site
// does not require connecting locally or to itself to fail
- var r = http.request({hostname: 'localhost', port: common.PORT}, function(res) {
+ var r = http.request({hostname: 'localhost',
+ port: common.PORT}, function(res) {
// required, just needs to be in the client response somewhere
- serverRes.end();
+ serverRes.end();
// required for test to fail
res.on('data', function(data) { });
diff --git a/test/sequential/test-regress-GH-746.js b/test/sequential/test-regress-GH-746.js
index 93346c43f1..4b79f3c4e3 100644
--- a/test/sequential/test-regress-GH-746.js
+++ b/test/sequential/test-regress-GH-746.js
@@ -1,3 +1,4 @@
+'use strict';
// Just test that destroying stdin doesn't mess up listening on a server.
// This is a regression test for GH-746.
diff --git a/test/sequential/test-regress-GH-784.js b/test/sequential/test-regress-GH-784.js
index a33b6f23c4..08f660add3 100644
--- a/test/sequential/test-regress-GH-784.js
+++ b/test/sequential/test-regress-GH-784.js
@@ -1,3 +1,4 @@
+'use strict';
// Regression test for GH-784
// https://github.com/joyent/node/issues/784
//
diff --git a/test/sequential/test-regress-GH-819.js b/test/sequential/test-regress-GH-819.js
index 16d0f3bc54..e459587d97 100644
--- a/test/sequential/test-regress-GH-819.js
+++ b/test/sequential/test-regress-GH-819.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var net = require('net');
var assert = require('assert');
diff --git a/test/sequential/test-regress-GH-877.js b/test/sequential/test-regress-GH-877.js
index 80c8456742..69671b9dc4 100644
--- a/test/sequential/test-regress-GH-877.js
+++ b/test/sequential/test-regress-GH-877.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var http = require('http');
var assert = require('assert');
diff --git a/test/sequential/test-require-cache-without-stat.js b/test/sequential/test-require-cache-without-stat.js
index 701d47bfc9..c602ab82b1 100644
--- a/test/sequential/test-require-cache-without-stat.js
+++ b/test/sequential/test-require-cache-without-stat.js
@@ -1,3 +1,4 @@
+'use strict';
// We've experienced a regression where the module loader stats a bunch of
// directories on require() even if it's been called before. The require()
// should caching the request.
diff --git a/test/sequential/test-setproctitle.js b/test/sequential/test-setproctitle.js
index b7e6dd8b55..a0b15e2b85 100644
--- a/test/sequential/test-setproctitle.js
+++ b/test/sequential/test-setproctitle.js
@@ -1,3 +1,4 @@
+'use strict';
// Original test written by Jakub Lekstan <kuebzky@gmail.com>
// FIXME add sunos support
diff --git a/test/sequential/test-sigint-infinite-loop.js b/test/sequential/test-sigint-infinite-loop.js
index c444caf419..8211aeb69e 100644
--- a/test/sequential/test-sigint-infinite-loop.js
+++ b/test/sequential/test-sigint-infinite-loop.js
@@ -1,3 +1,4 @@
+'use strict';
// This test is to assert that we can SIGINT a script which loops forever.
// Ref(http):
// groups.google.com/group/nodejs-dev/browse_thread/thread/e20f2f8df0296d3f
diff --git a/test/sequential/test-socket-write-after-fin-error.js b/test/sequential/test-socket-write-after-fin-error.js
index 5274d6e3da..226440ec50 100644
--- a/test/sequential/test-socket-write-after-fin-error.js
+++ b/test/sequential/test-socket-write-after-fin-error.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
@@ -24,7 +25,7 @@ var server = net.createServer(function(sock) {
serverData += c;
});
sock.on('end', function() {
- gotServerEnd = true
+ gotServerEnd = true;
sock.write(serverData);
sock.end();
});
diff --git a/test/sequential/test-socket-write-after-fin.js b/test/sequential/test-socket-write-after-fin.js
index 44d98ba512..ea8ac27b59 100644
--- a/test/sequential/test-socket-write-after-fin.js
+++ b/test/sequential/test-socket-write-after-fin.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
@@ -12,7 +13,7 @@ var server = net.createServer({ allowHalfOpen: true }, function(sock) {
serverData += c;
});
sock.on('end', function() {
- gotServerEnd = true
+ gotServerEnd = true;
sock.end(serverData);
server.close();
});
diff --git a/test/sequential/test-stdin-child-proc.js b/test/sequential/test-stdin-child-proc.js
index 4d3ead73ce..93bf265b8b 100644
--- a/test/sequential/test-stdin-child-proc.js
+++ b/test/sequential/test-stdin-child-proc.js
@@ -1,3 +1,4 @@
+'use strict';
// This tests that pausing and resuming stdin does not hang and timeout
// when done in a child process. See test/simple/test-stdin-pause-resume.js
var common = require('../common');
diff --git a/test/sequential/test-stdin-from-file.js b/test/sequential/test-stdin-from-file.js
index bde2a8559c..35aa5b1a89 100644
--- a/test/sequential/test-stdin-from-file.js
+++ b/test/sequential/test-stdin-from-file.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var join = require('path').join;
diff --git a/test/sequential/test-stdin-pipe-resume.js b/test/sequential/test-stdin-pipe-resume.js
index a326e380a7..dbac78d78c 100644
--- a/test/sequential/test-stdin-pipe-resume.js
+++ b/test/sequential/test-stdin-pipe-resume.js
@@ -1,3 +1,4 @@
+'use strict';
// This tests that piping stdin will cause it to resume() as well.
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-stdin-script-child.js b/test/sequential/test-stdin-script-child.js
index dcccff1ff5..8590df02d8 100644
--- a/test/sequential/test-stdin-script-child.js
+++ b/test/sequential/test-stdin-script-child.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js b/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js
index 519dce059b..c6f5aecd40 100644
--- a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js
+++ b/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-stdout-close-catch.js b/test/sequential/test-stdout-close-catch.js
index c1165350ae..f0ecf9a7c4 100644
--- a/test/sequential/test-stdout-close-catch.js
+++ b/test/sequential/test-stdout-close-catch.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
diff --git a/test/sequential/test-stdout-stderr-reading.js b/test/sequential/test-stdout-stderr-reading.js
index 3fe0db0ce3..82fd51cedd 100644
--- a/test/sequential/test-stdout-stderr-reading.js
+++ b/test/sequential/test-stdout-stderr-reading.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-stdout-to-file.js b/test/sequential/test-stdout-to-file.js
index 8a9d047691..4ef473e57a 100644
--- a/test/sequential/test-stdout-to-file.js
+++ b/test/sequential/test-stdout-to-file.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
diff --git a/test/sequential/test-stream2-fs.js b/test/sequential/test-stream2-fs.js
index 552d686af0..96ab97174b 100644
--- a/test/sequential/test-stream2-fs.js
+++ b/test/sequential/test-stream2-fs.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var R = require('_stream_readable');
var assert = require('assert');
@@ -32,7 +33,7 @@ TestWriter.prototype.write = function(c) {
TestWriter.prototype.end = function(c) {
if (c) this.buffer.push(c.toString());
this.emit('results', this.buffer);
-}
+};
var r = new FSReadable(file);
var w = new TestWriter();
@@ -41,7 +42,7 @@ w.on('results', function(res) {
console.error(res, w.length);
assert.equal(w.length, size);
var l = 0;
- assert.deepEqual(res.map(function (c) {
+ assert.deepEqual(res.map(function(c) {
return c.length;
}), expectLengths);
console.log('ok');
diff --git a/test/sequential/test-stream2-httpclient-response-end.js b/test/sequential/test-stream2-httpclient-response-end.js
index 627960888a..15d7fba27f 100644
--- a/test/sequential/test-stream2-httpclient-response-end.js
+++ b/test/sequential/test-stream2-httpclient-response-end.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var http = require('http');
diff --git a/test/sequential/test-stream2-stderr-sync.js b/test/sequential/test-stream2-stderr-sync.js
index 9b634116db..ccbdc55e4f 100644
--- a/test/sequential/test-stream2-stderr-sync.js
+++ b/test/sequential/test-stream2-stderr-sync.js
@@ -1,3 +1,4 @@
+'use strict';
// Make sure that sync writes to stderr get processed before exiting.
var common = require('../common');
diff --git a/test/sequential/test-sync-fileread.js b/test/sequential/test-sync-fileread.js
index 3f5f6debd5..24a80d96c2 100644
--- a/test/sequential/test-sync-fileread.js
+++ b/test/sequential/test-sync-fileread.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
diff --git a/test/sequential/test-tcp-wrap-connect.js b/test/sequential/test-tcp-wrap-connect.js
index 2dc9f0cb93..9373906c6f 100644
--- a/test/sequential/test-tcp-wrap-connect.js
+++ b/test/sequential/test-tcp-wrap-connect.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var TCP = process.binding('tcp_wrap').TCP;
diff --git a/test/sequential/test-tcp-wrap-listen.js b/test/sequential/test-tcp-wrap-listen.js
index 2c0856bd95..a2c07a7a9c 100644
--- a/test/sequential/test-tcp-wrap-listen.js
+++ b/test/sequential/test-tcp-wrap-listen.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-tls-honorcipherorder.js b/test/sequential/test-tls-honorcipherorder.js
index cad1a83a30..c33cd9eea6 100644
--- a/test/sequential/test-tls-honorcipherorder.js
+++ b/test/sequential/test-tls-honorcipherorder.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-util-debug.js b/test/sequential/test-util-debug.js
index 1af9a7705a..834c21ec0e 100644
--- a/test/sequential/test-util-debug.js
+++ b/test/sequential/test-util-debug.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
diff --git a/test/sequential/test-vm-syntax-error-stderr.js b/test/sequential/test-vm-syntax-error-stderr.js
index b3f76e5e30..f7b1bef9e3 100644
--- a/test/sequential/test-vm-syntax-error-stderr.js
+++ b/test/sequential/test-vm-syntax-error-stderr.js
@@ -1,3 +1,4 @@
+'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
diff --git a/test/sequential/test-vm-timeout-rethrow.js b/test/sequential/test-vm-timeout-rethrow.js
index 547ed2f8d6..4f3af900ee 100644
--- a/test/sequential/test-vm-timeout-rethrow.js
+++ b/test/sequential/test-vm-timeout-rethrow.js
@@ -1,10 +1,11 @@
+'use strict';
var assert = require('assert');
var vm = require('vm');
var spawn = require('child_process').spawn;
if (process.argv[2] === 'child') {
var code = 'var j = 0;\n' +
- 'for (var i = 0; i < 1000000; i++) j += add(i, i + 1);\n'
+ 'for (var i = 0; i < 1000000; i++) j += add(i, i + 1);\n' +
'j;';
var ctx = vm.createContext({
diff --git a/test/sequential/test-zerolengthbufferbug.js b/test/sequential/test-zerolengthbufferbug.js
index dde08c6391..de36444180 100644
--- a/test/sequential/test-zerolengthbufferbug.js
+++ b/test/sequential/test-zerolengthbufferbug.js
@@ -1,3 +1,4 @@
+'use strict';
// Serving up a zero-length buffer should work.
var common = require('../common');