diff options
Diffstat (limited to 'test/simple/test-pump-file2tcp-noexist.js')
-rw-r--r-- | test/simple/test-pump-file2tcp-noexist.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/simple/test-pump-file2tcp-noexist.js b/test/simple/test-pump-file2tcp-noexist.js index b2f608e4a9..d7b59b150c 100644 --- a/test/simple/test-pump-file2tcp-noexist.js +++ b/test/simple/test-pump-file2tcp-noexist.js @@ -9,34 +9,34 @@ var fn = path.join(common.fixturesDir, 'does_not_exist.txt'); var got_error = false; var conn_closed = false; -var server = net.createServer(function (stream) { +var server = net.createServer(function(stream) { common.error('pump!'); - util.pump(fs.createReadStream(fn), stream, function (err) { - common.error("util.pump's callback fired"); + util.pump(fs.createReadStream(fn), stream, function(err) { + common.error('util.pump\'s callback fired'); if (err) { got_error = true; } else { - common.debug("util.pump's callback fired with no error"); - common.debug("this shouldn't happen as the file doesn't exist..."); + common.debug('util.pump\'s callback fired with no error'); + common.debug('this shouldn\'t happen as the file doesn\'t exist...'); assert.equal(true, false); } server.close(); }); }); -server.listen(common.PORT, function () { +server.listen(common.PORT, function() { var conn = net.createConnection(common.PORT); conn.setEncoding('utf8'); - conn.addListener("data", function (chunk) { + conn.addListener('data', function(chunk) { common.error('recv data! nchars = ' + chunk.length); buffer += chunk; }); - conn.addListener("end", function () { + conn.addListener('end', function() { conn.end(); }); - conn.addListener("close", function () { + conn.addListener('close', function() { common.error('client connection close'); conn_closed = true; }); @@ -44,8 +44,8 @@ server.listen(common.PORT, function () { var buffer = ''; -process.addListener('exit', function () { +process.addListener('exit', function() { assert.equal(true, got_error); assert.equal(true, conn_closed); - console.log("exiting"); + console.log('exiting'); }); |