From 372a7c9a3ef377f203ecf453042101ee73328c88 Mon Sep 17 00:00:00 2001 From: Micheil Smith Date: Tue, 12 Oct 2010 10:09:02 +1100 Subject: [PATCH] Migrated from sys.p to console.dir --- test/pummel/test-net-timeout.js | 4 ++-- test/simple/test-c-ares.js | 6 +++--- test/simple/test-child-process-buffering.js | 2 +- test/simple/test-exec.js | 4 ++-- test/simple/test-fs-stat.js | 10 +++++----- test/simple/test-http.js | 2 +- test/simple/test-net-binary.js | 2 +- test/simple/test-readdir.js | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/pummel/test-net-timeout.js b/test/pummel/test-net-timeout.js index 862f5ae..c7b6764 100644 --- a/test/pummel/test-net-timeout.js +++ b/test/pummel/test-net-timeout.js @@ -12,7 +12,7 @@ var echo_server = net.createServer(function (socket) { socket.addListener("timeout", function () { console.log("server timeout"); timeouttime = new Date; - common.p(timeouttime); + console.dir(timeouttime); socket.destroy(); }); @@ -53,7 +53,7 @@ client.addListener("data", function (chunk) { if (exchanges == 5) { console.log("wait for timeout - should come in " + timeout + " ms"); starttime = new Date; - common.p(starttime); + console.dir(starttime); } } }); diff --git a/test/simple/test-c-ares.js b/test/simple/test-c-ares.js index 8f93e89..234cf13 100644 --- a/test/simple/test-c-ares.js +++ b/test/simple/test-c-ares.js @@ -7,12 +7,12 @@ var dns = require("dns"); // Try resolution without callback dns.getHostByName('localhost', function (error, result) { - common.p(result); + console.dir(result); assert.deepEqual(['127.0.0.1'], result); }); dns.getHostByName('127.0.0.1', function (error, result) { - common.p(result); + console.dir(result); assert.deepEqual(['127.0.0.1'], result); }); @@ -33,7 +33,7 @@ dns.lookup('::1', function (error, result, addressType) { dns.lookup('ipv6.google.com', function (error, result, addressType) { if (error) throw error; - common.p(arguments); + console.dir(arguments); //assert.equal('string', typeof result); assert.equal(6, addressType); }); diff --git a/test/simple/test-child-process-buffering.js b/test/simple/test-child-process-buffering.js index c34e434..ef9259e 100644 --- a/test/simple/test-child-process-buffering.js +++ b/test/simple/test-child-process-buffering.js @@ -25,7 +25,7 @@ function pwd (callback) { pwd(function (result) { - common.p(result); + console.dir(result); assert.equal(true, result.length > 1); assert.equal("\n", result[result.length-1]); }); diff --git a/test/simple/test-exec.js b/test/simple/test-exec.js index c37d0dd..b8e7577 100644 --- a/test/simple/test-exec.js +++ b/test/simple/test-exec.js @@ -13,7 +13,7 @@ exec("ls /", function (err, stdout, stderr) { assert.equal(false, err.killed); } else { success_count++; - common.p(stdout); + console.dir(stdout); } }); @@ -30,7 +30,7 @@ exec("ls /DOES_NOT_EXIST", function (err, stdout, stderr) { console.log("stderr: " + JSON.stringify(stderr)); } else { success_count++; - common.p(stdout); + console.dir(stdout); assert.equal(true, stdout != ""); } }); diff --git a/test/simple/test-fs-stat.js b/test/simple/test-fs-stat.js index 7623a95f..5793ebb 100644 --- a/test/simple/test-fs-stat.js +++ b/test/simple/test-fs-stat.js @@ -8,7 +8,7 @@ fs.stat(".", function (err, stats) { if (err) { got_error = true; } else { - common.p(stats); + console.dir(stats); assert.ok(stats.mtime instanceof Date); success_count++; } @@ -18,7 +18,7 @@ fs.lstat(".", function (err, stats) { if (err) { got_error = true; } else { - common.p(stats); + console.dir(stats); assert.ok(stats.mtime instanceof Date); success_count++; } @@ -33,7 +33,7 @@ fs.open(".", "r", undefined, function(err, fd) { if (err) { got_error = true; } else { - common.p(stats); + console.dir(stats); assert.ok(stats.mtime instanceof Date); success_count++; fs.close(fd); @@ -50,7 +50,7 @@ fs.open(".", "r", undefined, function(err, fd) { got_error = true; } if (stats) { - common.p(stats); + console.dir(stats); assert.ok(stats.mtime instanceof Date); success_count++; } @@ -62,7 +62,7 @@ fs.stat(__filename, function (err, s) { if (err) { got_error = true; } else { - common.p(s); + console.dir(s); success_count++; console.log("isDirectory: " + JSON.stringify( s.isDirectory() ) ); diff --git a/test/simple/test-http.js b/test/simple/test-http.js index 3d7fc3d..899406d 100644 --- a/test/simple/test-http.js +++ b/test/simple/test-http.js @@ -17,7 +17,7 @@ var server = http.Server(function (req, res) { assert.equal("GET", req.method); assert.equal("/hello", url.parse(req.url).pathname); - common.p(req.headers); + console.dir(req.headers); assert.equal(true, "accept" in req.headers); assert.equal("*/*", req.headers["accept"]); diff --git a/test/simple/test-net-binary.js b/test/simple/test-net-binary.js index 6274ad8..e2687be 100644 --- a/test/simple/test-net-binary.js +++ b/test/simple/test-net-binary.js @@ -55,7 +55,7 @@ echoServer.addListener("listening", function() { }); c.addListener("close", function () { - common.p(recv); + console.dir(recv); echoServer.close(); }); }); diff --git a/test/simple/test-readdir.js b/test/simple/test-readdir.js index e89f42a..9012f93 100644 --- a/test/simple/test-readdir.js +++ b/test/simple/test-readdir.js @@ -19,7 +19,7 @@ var files = ['are' console.log('readdirSync ' + readdirDir); var f = fs.readdirSync(readdirDir); -common.p(f); +console.dir(f); assert.deepEqual(files, f.sort()); @@ -29,7 +29,7 @@ fs.readdir(readdirDir, function (err, f) { console.log("error"); got_error = true; } else { - common.p(f); + console.dir(f); assert.deepEqual(files, f.sort()); } }); -- 2.7.4