From 306936e98fa6c06b52095f5a369a03c6e722b285 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Sep 2015 16:16:35 -0700 Subject: [PATCH] test: change calls to deprecated util.print() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit common.print() is just util.print() and as such prints a deprecation warning. Per docs, update to console.log(). PR-URL: https://github.com/nodejs/node/pull/3083 Reviewed-By: Michaƫl Zasso Reviewed-By: Brendan Ashworth --- test/fixtures/net-fd-passing-receiver.js | 2 +- test/pummel/test-net-many-clients.js | 6 +++--- test/pummel/test-net-pause.js | 2 +- test/sequential/test-stdout-to-file.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/fixtures/net-fd-passing-receiver.js b/test/fixtures/net-fd-passing-receiver.js index 99f69be2a4..0dba242766 100644 --- a/test/fixtures/net-fd-passing-receiver.js +++ b/test/fixtures/net-fd-passing-receiver.js @@ -26,7 +26,7 @@ receiver = net.createServer(function(socket) { /* To signal the test runne we're up and listening */ receiver.on('listening', function() { - common.print('ready'); + console.log('ready'); }); receiver.listen(path); diff --git a/test/pummel/test-net-many-clients.js b/test/pummel/test-net-many-clients.js index b70efbda58..6d9dde1ddb 100644 --- a/test/pummel/test-net-many-clients.js +++ b/test/pummel/test-net-many-clients.js @@ -19,7 +19,7 @@ for (var i = 0; i < bytes; i++) { var server = net.createServer(function(c) { console.log('connected'); total_connections++; - common.print('#'); + console.log('#'); c.write(body); c.end(); }); @@ -32,7 +32,7 @@ function runClient(callback) { client.setEncoding('utf8'); client.on('connect', function() { - common.print('c'); + console.log('c'); client.recved = ''; client.connections += 1; }); @@ -51,7 +51,7 @@ function runClient(callback) { }); client.on('close', function(had_error) { - common.print('.'); + console.log('.'); assert.equal(false, had_error); assert.equal(bytes, client.recved.length); diff --git a/test/pummel/test-net-pause.js b/test/pummel/test-net-pause.js index 71a3e17c12..b0c5126043 100644 --- a/test/pummel/test-net-pause.js +++ b/test/pummel/test-net-pause.js @@ -24,7 +24,7 @@ server.on('listening', function() { var client = net.createConnection(common.PORT); client.setEncoding('ascii'); client.on('data', function(d) { - common.print(d); + console.log(d); recv += d; }); diff --git a/test/sequential/test-stdout-to-file.js b/test/sequential/test-stdout-to-file.js index 41b61df4d7..bd1d97b3d8 100644 --- a/test/sequential/test-stdout-to-file.js +++ b/test/sequential/test-stdout-to-file.js @@ -24,7 +24,7 @@ function test(size, useBuffer, cb) { fs.unlinkSync(tmpFile); } catch (e) {} - common.print(size + ' chars to ' + tmpFile + '...'); + console.log(size + ' chars to ' + tmpFile + '...'); childProcess.exec(cmd, function(err) { if (err) throw err;