From 1167171004a3d4e3d789470bf913ee66797a5b4f 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=utf8 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 99f69be..0dba242 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 b70efbd..6d9dde1 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 71a3e17..b0c5126 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 41b61df..bd1d97b 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; -- 2.7.4