test: change calls to deprecated util.print()
authorRich Trott <rtrott@gmail.com>
Sat, 26 Sep 2015 23:16:35 +0000 (16:16 -0700)
committerRod Vagg <rod@vagg.org>
Wed, 30 Sep 2015 12:19:52 +0000 (22:19 +1000)
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 <mic.besace@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
test/fixtures/net-fd-passing-receiver.js
test/pummel/test-net-many-clients.js
test/pummel/test-net-pause.js
test/sequential/test-stdout-to-file.js

index 99f69be..0dba242 100644 (file)
@@ -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);
index b70efbd..6d9dde1 100644 (file)
@@ -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);
 
index 71a3e17..b0c5126 100644 (file)
@@ -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;
   });
 
index 41b61df..bd1d97b 100644 (file)
@@ -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;