Browse Source

test: change calls to deprecated util.print()

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>
v5.x
Rich Trott 9 years ago
parent
commit
306936e98f
  1. 2
      test/fixtures/net-fd-passing-receiver.js
  2. 6
      test/pummel/test-net-many-clients.js
  3. 2
      test/pummel/test-net-pause.js
  4. 2
      test/sequential/test-stdout-to-file.js

2
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);

6
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);

2
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;
});

2
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;

Loading…
Cancel
Save