summaryrefslogtreecommitdiff
path: root/test/simple
diff options
context:
space:
mode:
Diffstat (limited to 'test/simple')
-rw-r--r--test/simple/test-buffer.js6
-rw-r--r--test/simple/test-child-process-buffering.js4
-rw-r--r--test/simple/test-child-process-custom-fds.js16
-rw-r--r--test/simple/test-child-process-env.js2
-rw-r--r--test/simple/test-child-process-ipc.js6
-rw-r--r--test/simple/test-child-process-stdin.js4
-rw-r--r--test/simple/test-child-process-stdout-flush.js6
-rw-r--r--test/simple/test-crypto.js2
-rw-r--r--test/simple/test-dgram-pingpong.js12
-rw-r--r--test/simple/test-eio-race.js10
-rw-r--r--test/simple/test-eio-race2.js6
-rw-r--r--test/simple/test-eio-race4.js2
-rw-r--r--test/simple/test-error-reporting.js2
-rw-r--r--test/simple/test-event-emitter-add-listeners.js6
-rw-r--r--test/simple/test-event-emitter-remove-listeners.js6
-rw-r--r--test/simple/test-exception-handler.js6
-rw-r--r--test/simple/test-exec.js12
-rw-r--r--test/simple/test-executable-path.js4
-rw-r--r--test/simple/test-file-read-noexist.js2
-rw-r--r--test/simple/test-fs-chmod.js2
-rw-r--r--test/simple/test-fs-read-buffer.js2
-rw-r--r--test/simple/test-fs-read.js2
-rw-r--r--test/simple/test-fs-readfile-empty.js2
-rw-r--r--test/simple/test-fs-realpath.js2
-rw-r--r--test/simple/test-fs-stat.js16
-rw-r--r--test/simple/test-fs-symlink.js4
-rw-r--r--test/simple/test-fs-write.js8
-rw-r--r--test/simple/test-http-1.0.js2
-rw-r--r--test/simple/test-http-304.js2
-rw-r--r--test/simple/test-http-cat.js8
-rw-r--r--test/simple/test-http-chunked.js4
-rw-r--r--test/simple/test-http-client-upload.js6
-rw-r--r--test/simple/test-http-exceptions.js4
-rw-r--r--test/simple/test-http-full-response.js8
-rw-r--r--test/simple/test-http-malformed-request.js2
-rw-r--r--test/simple/test-http-parser.js8
-rw-r--r--test/simple/test-http-set-timeout.js6
-rw-r--r--test/simple/test-http-tls.js4
-rw-r--r--test/simple/test-http-wget.js6
-rw-r--r--test/simple/test-http-write-empty-string.js2
-rw-r--r--test/simple/test-memory-usage.js2
-rw-r--r--test/simple/test-mkdir-rmdir.js10
-rw-r--r--test/simple/test-module-loading.js2
-rw-r--r--test/simple/test-net-binary.js6
-rw-r--r--test/simple/test-net-pingpong.js14
-rw-r--r--test/simple/test-net-reconnect.js10
-rw-r--r--test/simple/test-net-tls.js2
-rw-r--r--test/simple/test-next-tick-ordering.js6
-rw-r--r--test/simple/test-readdir.js8
-rw-r--r--test/simple/test-regression-object-prototype.js4
-rw-r--r--test/simple/test-signal-handler.js8
-rw-r--r--test/simple/test-signal-unregister.js6
-rw-r--r--test/simple/test-stdin-from-file.js4
-rw-r--r--test/simple/test-stdout-to-file.js8
-rw-r--r--test/simple/test-string-decoder.js2
-rw-r--r--test/simple/test-utf8-scripts.js2
56 files changed, 154 insertions, 154 deletions
diff --git a/test/simple/test-buffer.js b/test/simple/test-buffer.js
index 89a0148119..949b5b844e 100644
--- a/test/simple/test-buffer.js
+++ b/test/simple/test-buffer.js
@@ -5,7 +5,7 @@ var Buffer = require('buffer').Buffer;
var b = new Buffer(1024);
-puts("b.length == " + b.length);
+console.log("b.length == " + b.length);
assert.equal(1024, b.length);
for (var i = 0; i < 1024; i++) {
@@ -90,7 +90,7 @@ assert.deepEqual([0xDEADBEEF], b.unpack('N', 4));
var testValue = '\u00F6\u65E5\u672C\u8A9E'; // ö日本語
var buffer = new Buffer(32);
var size = buffer.utf8Write(testValue, 0);
-puts('bytes written to buffer: ' + size);
+console.log('bytes written to buffer: ' + size);
var slice = buffer.toString('utf8', 0, size);
assert.equal(slice, testValue);
@@ -118,4 +118,4 @@ var e = new Buffer('über');
assert.deepEqual(e, new Buffer([195, 188, 98, 101, 114]));
var f = new Buffer('über', 'ascii');
-assert.deepEqual(f, new Buffer([252, 98, 101, 114])); \ No newline at end of file
+assert.deepEqual(f, new Buffer([252, 98, 101, 114]));
diff --git a/test/simple/test-child-process-buffering.js b/test/simple/test-child-process-buffering.js
index 10ec8f847a..f6662a2817 100644
--- a/test/simple/test-child-process-buffering.js
+++ b/test/simple/test-child-process-buffering.js
@@ -10,12 +10,12 @@ function pwd (callback) {
child.stdout.setEncoding('utf8');
child.stdout.addListener("data", function (s) {
- puts("stdout: " + JSON.stringify(s));
+ console.log("stdout: " + JSON.stringify(s));
output += s;
});
child.addListener("exit", function (c) {
- puts("exit: " + c);
+ console.log("exit: " + c);
assert.equal(0, c);
callback(output);
pwd_called = true;
diff --git a/test/simple/test-child-process-custom-fds.js b/test/simple/test-child-process-custom-fds.js
index d645010a67..39e704b1d0 100644
--- a/test/simple/test-child-process-custom-fds.js
+++ b/test/simple/test-child-process-custom-fds.js
@@ -17,7 +17,7 @@ var expected = "hello world";
var helloPath = fixtPath("hello.txt");
function test1(next) {
- puts("Test 1...");
+ console.log("Test 1...");
fs.open(helloPath, 'w', 400, function (err, fd) {
if (err) throw err;
var child = spawn('/bin/echo', [expected], undefined, [-1, fd] );
@@ -34,7 +34,7 @@ function test1(next) {
fs.readFile(helloPath, function (err, data) {
if (err) throw err;
assert.equal(data.toString(), expected + "\n");
- puts(' File was written.');
+ console.log(' File was written.');
next(test3);
});
});
@@ -45,7 +45,7 @@ function test1(next) {
// Test the equivalent of:
// $ node ../fixture/stdio-filter.js < hello.txt
function test2(next) {
- puts("Test 2...");
+ console.log("Test 2...");
fs.open(helloPath, 'r', undefined, function (err, fd) {
var child = spawn(process.argv[0]
, [fixtPath('stdio-filter.js'), 'o', 'a']
@@ -59,7 +59,7 @@ function test2(next) {
child.addListener('exit', function (code) {
if (err) throw err;
assert.equal(actualData, "hella warld\n");
- puts(" File was filtered successfully");
+ console.log(" File was filtered successfully");
fs.close(fd, function () {
next(test3);
});
@@ -70,19 +70,19 @@ function test2(next) {
// Test the equivalent of:
// $ /bin/echo "hello world" | ../stdio-filter.js a o
function test3(next) {
- puts("Test 3...");
+ console.log("Test 3...");
var filter = spawn(process.argv[0]
, [fixtPath('stdio-filter.js'), 'o', 'a']);
var echo = spawn('/bin/echo', [expected], undefined, [-1, filter.fds[0]]);
var actualData = '';
filter.stdout.addListener('data', function(data) {
- puts(" Got data --> " + data);
+ console.log(" Got data --> " + data);
actualData += data;
});
filter.addListener('exit', function(code) {
if (code) throw "Return code was " + code;
assert.equal(actualData, "hella warld\n");
- puts(" Talked to another process successfully");
+ console.log(" Talked to another process successfully");
});
echo.addListener('exit', function(code) {
if (code) throw "Return code was " + code;
@@ -91,4 +91,4 @@ function test3(next) {
});
}
-test1(test2); \ No newline at end of file
+test1(test2);
diff --git a/test/simple/test-child-process-env.js b/test/simple/test-child-process-env.js
index d6f9674d9b..5a0244831f 100644
--- a/test/simple/test-child-process-env.js
+++ b/test/simple/test-child-process-env.js
@@ -8,7 +8,7 @@ response = "";
child.stdout.setEncoding('utf8');
child.stdout.addListener("data", function (chunk) {
- puts("stdout: " + chunk);
+ console.log("stdout: " + chunk);
response += chunk;
});
diff --git a/test/simple/test-child-process-ipc.js b/test/simple/test-child-process-ipc.js
index 3b9881262e..f1482767ba 100644
--- a/test/simple/test-child-process-ipc.js
+++ b/test/simple/test-child-process-ipc.js
@@ -12,13 +12,13 @@ var gotEcho = false;
var child = spawn(process.argv[0], [sub]);
child.stderr.addListener("data", function (data){
- puts("parent stderr: " + data);
+ console.log("parent stderr: " + data);
});
child.stdout.setEncoding('utf8');
child.stdout.addListener("data", function (data){
- puts('child said: ' + JSON.stringify(data));
+ console.log('child said: ' + JSON.stringify(data));
if (!gotHelloWorld) {
assert.equal("hello world\r\n", data);
gotHelloWorld = true;
@@ -31,7 +31,7 @@ child.stdout.addListener("data", function (data){
});
child.stdout.addListener("end", function (data){
- puts('child end');
+ console.log('child end');
});
diff --git a/test/simple/test-child-process-stdin.js b/test/simple/test-child-process-stdin.js
index 6521f43768..730ae5ca1b 100644
--- a/test/simple/test-child-process-stdin.js
+++ b/test/simple/test-child-process-stdin.js
@@ -15,7 +15,7 @@ var gotStdoutEOF = false;
cat.stdout.setEncoding('utf8');
cat.stdout.addListener("data", function (chunk) {
- puts("stdout: " + chunk);
+ console.log("stdout: " + chunk);
response += chunk;
});
@@ -37,7 +37,7 @@ cat.stderr.addListener("end", function (chunk) {
cat.addListener("exit", function (status) {
- puts("exit event");
+ console.log("exit event");
exitStatus = status;
assert.equal("hello world", response);
});
diff --git a/test/simple/test-child-process-stdout-flush.js b/test/simple/test-child-process-stdout-flush.js
index 25c5118676..00cdbe0c6c 100644
--- a/test/simple/test-child-process-stdout-flush.js
+++ b/test/simple/test-child-process-stdout-flush.js
@@ -11,17 +11,17 @@ var count = 0;
child.stderr.setEncoding('utf8');
child.stderr.addListener("data", function (data) {
- puts("parent stderr: " + data);
+ console.log("parent stderr: " + data);
assert.ok(false);
});
child.stderr.setEncoding('utf8');
child.stdout.addListener("data", function (data) {
count += data.length;
- puts(count);
+ console.log(count);
});
child.addListener("exit", function (data) {
assert.equal(n, count);
- puts("okay");
+ console.log("okay");
});
diff --git a/test/simple/test-crypto.js b/test/simple/test-crypto.js
index 08f3e7812c..2cf052b151 100644
--- a/test/simple/test-crypto.js
+++ b/test/simple/test-crypto.js
@@ -3,7 +3,7 @@ require("../common");
try {
var crypto = require('crypto');
} catch (e) {
- puts("Not compiled with OPENSSL support.");
+ console.log("Not compiled with OPENSSL support.");
process.exit();
}
diff --git a/test/simple/test-dgram-pingpong.js b/test/simple/test-dgram-pingpong.js
index a450f73867..88e61cca7c 100644
--- a/test/simple/test-dgram-pingpong.js
+++ b/test/simple/test-dgram-pingpong.js
@@ -12,9 +12,9 @@ function pingPongTest (port, host) {
var sent_final_ping = false;
var server = dgram.createSocket(function (msg, rinfo) {
- puts("connection: " + rinfo.address + ":"+ rinfo.port);
+ console.log("connection: " + rinfo.address + ":"+ rinfo.port);
- puts("server got: " + msg);
+ console.log("server got: " + msg);
if (/PING/.exec(msg)) {
var buf = new Buffer(4);
@@ -33,7 +33,7 @@ function pingPongTest (port, host) {
server.bind(port, host);
server.addListener("listening", function () {
- puts("server listening on " + port + " " + host);
+ console.log("server listening on " + port + " " + host);
var buf = new Buffer(4);
buf.write('PING');
@@ -41,7 +41,7 @@ function pingPongTest (port, host) {
var client = dgram.createSocket();
client.addListener("message", function (msg, rinfo) {
- puts("client got: " + msg);
+ console.log("client got: " + msg);
assert.equal("PONG", msg.toString('ascii'));
count += 1;
@@ -58,7 +58,7 @@ function pingPongTest (port, host) {
});
client.addListener("close", function () {
- puts('client.close');
+ console.log('client.close');
assert.equal(N, count);
tests_run += 1;
server.close();
@@ -84,5 +84,5 @@ pingPongTest(20997, "::1");
process.addListener("exit", function () {
assert.equal(4, tests_run);
- puts('done');
+ console.log('done');
});
diff --git a/test/simple/test-eio-race.js b/test/simple/test-eio-race.js
index 580495923e..387cc79e5f 100644
--- a/test/simple/test-eio-race.js
+++ b/test/simple/test-eio-race.js
@@ -4,19 +4,19 @@ var count = 100;
var fs = require('fs');
function tryToKillEventLoop() {
- puts('trying to kill event loop ...');
+ console.log('trying to kill event loop ...');
fs.stat(__filename, function (err) {
if (err) {
throw new Exception('first fs.stat failed')
} else {
- puts('first fs.stat succeeded ...');
+ console.log('first fs.stat succeeded ...');
fs.stat(__filename, function (err) {
if (err) {
throw new Exception('second fs.stat failed')
} else {
- puts('second fs.stat succeeded ...');
- puts('could not kill event loop, retrying...');
+ console.log('second fs.stat succeeded ...');
+ console.log('could not kill event loop, retrying...');
setTimeout(function () {
if (--count) {
@@ -41,7 +41,7 @@ fs.open('/dev/zero', "r", 0666, function (err, fd) {
if (err) throw err;
if (chunk) {
pos += bytesRead;
- //puts(pos);
+ //console.log(pos);
readChunk();
} else {
fs.closeSync(fd);
diff --git a/test/simple/test-eio-race2.js b/test/simple/test-eio-race2.js
index 374978904b..207a5926b2 100644
--- a/test/simple/test-eio-race2.js
+++ b/test/simple/test-eio-race2.js
@@ -8,13 +8,13 @@ setTimeout(function () {
// require() calls..
N = 30;
for (var i=0; i < N; i++) {
- puts("start " + i);
+ console.log("start " + i);
fs.readFile(testTxt, function(err, data) {
if (err) {
- puts("error! " + e);
+ console.log("error! " + e);
process.exit(1);
} else {
- puts("finish");
+ console.log("finish");
}
});
}
diff --git a/test/simple/test-eio-race4.js b/test/simple/test-eio-race4.js
index 2109abaeee..21402c8f35 100644
--- a/test/simple/test-eio-race4.js
+++ b/test/simple/test-eio-race4.js
@@ -8,7 +8,7 @@ for (var i = 0; i < N; i++) {
fs.stat("does-not-exist-" + i, function (err) {
if (err) {
j++; // only makes it to about 17
- puts("finish " + j);
+ console.log("finish " + j);
} else {
throw new Error("this shouldn't be called");
}
diff --git a/test/simple/test-error-reporting.js b/test/simple/test-error-reporting.js
index aa02de92a9..46c8982c23 100644
--- a/test/simple/test-error-reporting.js
+++ b/test/simple/test-error-reporting.js
@@ -22,7 +22,7 @@ function errExec (script, callback) {
// Count the tests
exits++;
- puts('.');
+ console.log('.');
});
}
diff --git a/test/simple/test-event-emitter-add-listeners.js b/test/simple/test-event-emitter-add-listeners.js
index cdb9db7ef8..3583fb1041 100644
--- a/test/simple/test-event-emitter-add-listeners.js
+++ b/test/simple/test-event-emitter-add-listeners.js
@@ -7,18 +7,18 @@ var events_new_listener_emited = [];
var times_hello_emited = 0;
e.addListener("newListener", function (event, listener) {
- puts("newListener: " + event);
+ console.log("newListener: " + event);
events_new_listener_emited.push(event);
});
e.addListener("hello", function (a, b) {
- puts("hello");
+ console.log("hello");
times_hello_emited += 1
assert.equal("a", a);
assert.equal("b", b);
});
-puts("start");
+console.log("start");
e.emit("hello", "a", "b");
diff --git a/test/simple/test-event-emitter-remove-listeners.js b/test/simple/test-event-emitter-remove-listeners.js
index 87451c47da..b7fdc6d809 100644
--- a/test/simple/test-event-emitter-remove-listeners.js
+++ b/test/simple/test-event-emitter-remove-listeners.js
@@ -5,17 +5,17 @@ var events = require('events');
count = 0;
function listener1 () {
- puts('listener1');
+ console.log('listener1');
count++;
}
function listener2 () {
- puts('listener2');
+ console.log('listener2');
count++;
}
function listener3 () {
- puts('listener3');
+ console.log('listener3');
count++;
}
diff --git a/test/simple/test-exception-handler.js b/test/simple/test-exception-handler.js
index 61f92225e7..957e038d09 100644
--- a/test/simple/test-exception-handler.js
+++ b/test/simple/test-exception-handler.js
@@ -4,13 +4,13 @@ var MESSAGE = 'catch me if you can';
var caughtException = false;
process.addListener('uncaughtException', function (e) {
- puts("uncaught exception! 1");
+ console.log("uncaught exception! 1");
assert.equal(MESSAGE, e.message);
caughtException = true;
});
process.addListener('uncaughtException', function (e) {
- puts("uncaught exception! 2");
+ console.log("uncaught exception! 2");
assert.equal(MESSAGE, e.message);
caughtException = true;
});
@@ -20,6 +20,6 @@ setTimeout(function() {
}, 10);
process.addListener("exit", function () {
- puts("exit");
+ console.log("exit");
assert.equal(true, caughtException);
});
diff --git a/test/simple/test-exec.js b/test/simple/test-exec.js
index 8e92c98f39..0625c1941c 100644
--- a/test/simple/test-exec.js
+++ b/test/simple/test-exec.js
@@ -6,9 +6,9 @@ error_count = 0;
exec("ls /", function (err, stdout, stderr) {
if (err) {
error_count++;
- puts("error!: " + err.code);
- puts("stdout: " + JSON.stringify(stdout));
- puts("stderr: " + JSON.stringify(stderr));
+ console.log("error!: " + err.code);
+ console.log("stdout: " + JSON.stringify(stdout));
+ console.log("stderr: " + JSON.stringify(stderr));
assert.equal(false, err.killed);
} else {
success_count++;
@@ -24,9 +24,9 @@ exec("ls /DOES_NOT_EXIST", function (err, stdout, stderr) {
assert.equal(true, err.code != 0);
assert.equal(false, err.killed);
assert.strictEqual(null, err.signal);
- puts("error code: " + err.code);
- puts("stdout: " + JSON.stringify(stdout));
- puts("stderr: " + JSON.stringify(stderr));
+ console.log("error code: " + err.code);
+ console.log("stdout: " + JSON.stringify(stdout));
+ console.log("stderr: " + JSON.stringify(stderr));
} else {
success_count++;
p(stdout);
diff --git a/test/simple/test-executable-path.js b/test/simple/test-executable-path.js
index 7b59d4f363..1093621fb4 100644
--- a/test/simple/test-executable-path.js
+++ b/test/simple/test-executable-path.js
@@ -12,8 +12,8 @@ nodePath = path.join(__dirname,
isDebug ? 'node_g' : 'node');
nodePath = path.normalize(nodePath);
-puts('nodePath: ' + nodePath);
-puts('process.execPath: ' + process.execPath);
+console.log('nodePath: ' + nodePath);
+console.log('process.execPath: ' + process.execPath);
assert.equal(nodePath, process.execPath);
diff --git a/test/simple/test-file-read-noexist.js b/test/simple/test-file-read-noexist.js
index 13cd7f9c77..8589c0b735 100644
--- a/test/simple/test-file-read-noexist.js
+++ b/test/simple/test-file-read-noexist.js
@@ -15,6 +15,6 @@ fs.readFile(filename, "raw", function (err, content) {
});
process.addListener("exit", function () {
- puts("done");
+ console.log("done");
assert.equal(true, got_error);
});
diff --git a/test/simple/test-fs-chmod.js b/test/simple/test-fs-chmod.js
index f8c4d71453..732f29bc63 100644
--- a/test/simple/test-fs-chmod.js
+++ b/test/simple/test-fs-chmod.js
@@ -10,7 +10,7 @@ fs.chmod(file, 0777, function (err) {
if (err) {
got_error = true;
} else {
- puts(fs.statSync(file).mode);
+ console.log(fs.statSync(file).mode);
assert.equal(0777, fs.statSync(file).mode & 0777);
fs.chmodSync(file, 0644);
diff --git a/test/simple/test-fs-read-buffer.js b/test/simple/test-fs-read-buffer.js
index 5a18177a4d..7d4ebbf2f9 100644
--- a/test/simple/test-fs-read-buffer.js
+++ b/test/simple/test-fs-read-buffer.js
@@ -22,4 +22,4 @@ assert.equal(r, expected.length);
process.addListener('exit', function() {
assert.equal(readCalled, 1);
-}); \ No newline at end of file
+});
diff --git a/test/simple/test-fs-read.js b/test/simple/test-fs-read.js
index 7f9bf48d4a..bb23bc9e26 100644
--- a/test/simple/test-fs-read.js
+++ b/test/simple/test-fs-read.js
@@ -20,4 +20,4 @@ assert.equal(r[1], expected.length);
process.addListener('exit', function() {
assert.equal(readCalled, 1);
-}); \ No newline at end of file
+});
diff --git a/test/simple/test-fs-readfile-empty.js b/test/simple/test-fs-readfile-empty.js
index 8073fb5938..fec0cd729d 100644
--- a/test/simple/test-fs-readfile-empty.js
+++ b/test/simple/test-fs-readfile-empty.js
@@ -7,4 +7,4 @@ var
fs.readFile(fn, function(err, data) {
assert.ok(data);
-}); \ No newline at end of file
+});
diff --git a/test/simple/test-fs-realpath.js b/test/simple/test-fs-realpath.js
index 2bf444e5f8..6a6a70fb5f 100644
--- a/test/simple/test-fs-realpath.js
+++ b/test/simple/test-fs-realpath.js
@@ -241,7 +241,7 @@ var numtests = tests.length;
function runNextTest(err) {
if (err) throw err;
var test = tests.shift()
- if (!test) puts(numtests+' subtests completed OK for fs.realpath');
+ if (!test) console.log(numtests+' subtests completed OK for fs.realpath');
else test(runNextTest);
}
runNextTest();
diff --git a/test/simple/test-fs-stat.js b/test/simple/test-fs-stat.js
index eb19251184..c063eb966d 100644
--- a/test/simple/test-fs-stat.js
+++ b/test/simple/test-fs-stat.js
@@ -56,7 +56,7 @@ fs.open(".", "r", undefined, function(err, fd) {
fs.close(fd);
});
-puts("stating: " + __filename);
+console.log("stating: " + __filename);
fs.stat(__filename, function (err, s) {
if (err) {
got_error = true;
@@ -64,25 +64,25 @@ fs.stat(__filename, function (err, s) {
p(s);
success_count++;
- puts("isDirectory: " + JSON.stringify( s.isDirectory() ) );
+ console.log("isDirectory: " + JSON.stringify( s.isDirectory() ) );
assert.equal(false, s.isDirectory());
- puts("isFile: " + JSON.stringify( s.isFile() ) );
+ console.log("isFile: " + JSON.stringify( s.isFile() ) );
assert.equal(true, s.isFile());
- puts("isSocket: " + JSON.stringify( s.isSocket() ) );
+ console.log("isSocket: " + JSON.stringify( s.isSocket() ) );
assert.equal(false, s.isSocket());
- puts("isBlockDevice: " + JSON.stringify( s.isBlockDevice() ) );
+ console.log("isBlockDevice: " + JSON.stringify( s.isBlockDevice() ) );
assert.equal(false, s.isBlockDevice());
- puts("isCharacterDevice: " + JSON.stringify( s.isCharacterDevice() ) );
+ console.log("isCharacterDevice: " + JSON.stringify( s.isCharacterDevice() ) );
assert.equal(false, s.isCharacterDevice());
- puts("isFIFO: " + JSON.stringify( s.isFIFO() ) );
+ console.log("isFIFO: " + JSON.stringify( s.isFIFO() ) );
assert.equal(false, s.isFIFO());
- puts("isSymbolicLink: " + JSON.stringify( s.isSymbolicLink() ) );
+ console.log("isSymbolicLink: " + JSON.stringify( s.isSymbolicLink() ) );
assert.equal(false, s.isSymbolicLink());
assert.ok(s.mtime instanceof Date);
diff --git a/test/simple/test-fs-symlink.js b/test/simple/test-fs-symlink.js
index f7363eb05b..b35d3fe6fa 100644
--- a/test/simple/test-fs-symlink.js
+++ b/test/simple/test-fs-symlink.js
@@ -9,7 +9,7 @@ var linkPath = path.join(fixturesDir, "nested-index", 'one', 'symlink1.js');
try {fs.unlinkSync(linkPath);}catch(e){}
fs.symlink(linkData, linkPath, function(err){
if (err) throw err;
- puts('symlink done');
+ console.log('symlink done');
// todo: fs.lstat?
fs.readlink(linkPath, function(err, destination) {
if (err) throw err;
@@ -24,7 +24,7 @@ var dstPath = path.join(fixturesDir, "nested-index", 'one', 'link1.js');
try {fs.unlinkSync(dstPath);}catch(e){}
fs.link(srcPath, dstPath, function(err){
if (err) throw err;
- puts('hard link done');
+ console.log('hard link done');
var srcContent = fs.readFileSync(srcPath, 'utf8');
var dstContent = fs.readFileSync(dstPath, 'utf8');
assert.equal(srcContent, dstContent);
diff --git a/test/simple/test-fs-write.js b/test/simple/test-fs-write.js
index 24a8b8cf60..3c7004d8d0 100644
--- a/test/simple/test-fs-write.js
+++ b/test/simple/test-fs-write.js
@@ -8,15 +8,15 @@ var found;
fs.open(fn, 'w', 0644, function (err, fd) {
if (err) throw err;
- puts('open done');
+ console.log('open done');
fs.write(fd, expected, 0, "utf8", function (err, written) {
- puts('write done');
+ console.log('write done');
if (err) throw err;
assert.equal(Buffer.byteLength(expected), written);
fs.closeSync(fd);
found = fs.readFileSync(fn, 'utf8');
- puts('expected: ' + expected.toJSON());
- puts('found: ' + found.toJSON());
+ console.log('expected: ' + expected.toJSON());
+ console.log('found: ' + found.toJSON());
fs.unlinkSync(fn);
});
});
diff --git a/test/simple/test-http-1.0.js b/test/simple/test-http-1.0.js
index 534a408236..c284135de2 100644
--- a/test/simple/test-http-1.0.js
+++ b/test/simple/test-http-1.0.js
@@ -24,7 +24,7 @@ c.addListener("connect", function () {
});
c.addListener("data", function (chunk) {
- puts(chunk);
+ console.log(chunk);
server_response += chunk;
});
diff --git a/test/simple/test-http-304.js b/test/simple/test-http-304.js
index e71befc3c2..1d986c1492 100644
--- a/test/simple/test-http-304.js
+++ b/test/simple/test-http-304.js
@@ -18,4 +18,4 @@ s.listen(PORT, function () {
});
});
-sys.puts('Server running at http://127.0.0.1:'+PORT+'/')
+console.log('Server running at http://127.0.0.1:'+PORT+'/')
diff --git a/test/simple/test-http-cat.js b/test/simple/test-http-cat.js
index 69787ebdab..5bb778d0d1 100644
--- a/test/simple/test-http-cat.js
+++ b/test/simple/test-http-cat.js
@@ -3,7 +3,7 @@ http = require("http");
var body = "exports.A = function() { return 'A';}";
var server = http.createServer(function (req, res) {
- puts("got request");
+ console.log("got request");
res.writeHead(200, [
["Content-Length", body.length],
["Content-Type", "text/plain"]
@@ -19,7 +19,7 @@ server.listen(PORT, function () {
if (err) {
throw err;
} else {
- puts("got response");
+ console.log("got response");
got_good_server_content = true;
assert.equal(body, content);
server.close();
@@ -28,14 +28,14 @@ server.listen(PORT, function () {
http.cat("http://localhost:12312/", "utf8", function (err, content) {
if (err) {
- puts("got error (this should happen)");
+ console.log("got error (this should happen)");
bad_server_got_error = true;
}
});
});
process.addListener("exit", function () {
- puts("exit");
+ console.log("exit");
assert.equal(true, got_good_server_content);
assert.equal(true, bad_server_got_error);
});
diff --git a/test/simple/test-http-chunked.js b/test/simple/test-http-chunked.js
index b1168ebb61..14f0265342 100644
--- a/test/simple/test-http-chunked.js
+++ b/test/simple/test-http-chunked.js
@@ -12,8 +12,8 @@ server.listen(PORT);
http.cat("http://127.0.0.1:"+PORT+"/", "utf8", function (err, data) {
if (err) throw err;
assert.equal('string', typeof data);
- puts('here is the response:');
+ console.log('here is the response:');
assert.equal(UTF8_STRING, data);
- puts(data);
+ console.log(data);
server.close();
})
diff --git a/test/simple/test-http-client-upload.js b/test/simple/test-http-client-upload.js
index 82fd890739..8627cdcd61 100644
--- a/test/simple/test-http-client-upload.js
+++ b/test/simple/test-http-client-upload.js
@@ -10,13 +10,13 @@ var server = http.createServer(function(req, res) {
req.setBodyEncoding("utf8");
req.addListener('data', function (chunk) {
- puts("server got: " + JSON.stringify(chunk));
+ console.log("server got: " + JSON.stringify(chunk));
sent_body += chunk;
});
req.addListener('end', function () {
server_req_complete = true;
- puts("request complete from server");
+ console.log("request complete from server");
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('hello\n');
res.end();
@@ -36,7 +36,7 @@ error("client finished sending request");
req.addListener('response', function(res) {
res.setEncoding("utf8");
res.addListener('data', function(chunk) {
- puts(chunk);
+ console.log(chunk);
});
res.addListener('end', function() {
client_res_complete = true;
diff --git a/test/simple/test-http-exceptions.js b/test/simple/test-http-exceptions.js
index b373f8fc9b..71bd09170a 100644
--- a/test/simple/test-http-exceptions.js
+++ b/test/simple/test-http-exceptions.js
@@ -21,7 +21,7 @@ function check_reqs() {
}
});
if (done_reqs === 4) {
- sys.puts("Got all requests, which is bad.");
+ console.log("Got all requests, which is bad.");
clearTimeout(timer);
}
}
@@ -60,7 +60,7 @@ server.listen(PORT, function () {
});
function exception_handler(err) {
- sys.puts("Caught an exception: " + err);
+ console.log("Caught an exception: " + err);
if (err.name === "AssertionError") {
throw(err);
}
diff --git a/test/simple/test-http-full-response.js b/test/simple/test-http-full-response.js
index 6898805732..095ee3d0fa 100644
--- a/test/simple/test-http-full-response.js
+++ b/test/simple/test-http-full-response.js
@@ -22,7 +22,7 @@ function runAb(opts, callback) {
var command = "ab " + opts + " http://127.0.0.1:" + PORT + "/";
exec(command, function (err, stdout, stderr) {
if (err) {
- puts("ab not installed? skipping test.\n" + stderr);
+ console.log("ab not installed? skipping test.\n" + stderr);
process.exit();
return;
}
@@ -47,13 +47,13 @@ function runAb(opts, callback) {
server.listen(PORT, function () {
runAb("-c 1 -n 10", function () {
- puts("-c 1 -n 10 okay");
+ console.log("-c 1 -n 10 okay");
runAb("-c 1 -n 100", function () {
- puts("-c 1 -n 100 okay");
+ console.log("-c 1 -n 100 okay");
runAb("-c 1 -n 1000", function () {
- puts("-c 1 -n 1000 okay");
+ console.log("-c 1 -n 1000 okay");
server.close();
});
});
diff --git a/test/simple/test-http-malformed-request.js b/test/simple/test-http-malformed-request.js
index e93fba9037..71455270d1 100644
--- a/test/simple/test-http-malformed-request.js
+++ b/test/simple/test-http-malformed-request.js
@@ -10,7 +10,7 @@ nrequests_completed = 0;
nrequests_expected = 1;
var s = http.createServer(function (req, res) {
- puts("req: " + JSON.stringify(url.parse(req.url)));
+ console.log("req: " + JSON.stringify(url.parse(req.url)));
res.writeHead(200, {"Content-Type": "text/plain"});
res.write("Hello World");
diff --git a/test/simple/test-http-parser.js b/test/simple/test-http-parser.js
index e524cd009d..159aefdbfc 100644
--- a/test/simple/test-http-parser.js
+++ b/test/simple/test-http-parser.js
@@ -19,12 +19,12 @@ buffer.asciiWrite(request, 0, request.length);
var callbacks = 0;
parser.onMessageBegin = function () {
- puts("message begin");
+ console.log("message begin");
callbacks++;
};
parser.onHeadersComplete = function (info) {
- puts("headers complete: " + JSON.stringify(info));
+ console.log("headers complete: " + JSON.stringify(info));
assert.equal('GET', info.method);
assert.equal(1, info.versionMajor);
assert.equal(1, info.versionMinor);
@@ -37,9 +37,9 @@ parser.onURL = function (b, off, len) {
};
parser.onPath = function (b, off, length) {
- puts("path [" + off + ", " + length + "]");
+ console.log("path [" + off + ", " + length + "]");
var path = b.asciiSlice(off, off+length);
- puts("path = '" + path + "'");
+ console.log("path = '" + path + "'");
assert.equal('/hello', path);
callbacks++;
};
diff --git a/test/simple/test-http-set-timeout.js b/test/simple/test-http-set-timeout.js
index fdf5918306..d15044d9b8 100644
--- a/test/simple/test-http-set-timeout.js
+++ b/test/simple/test-http-set-timeout.js
@@ -3,7 +3,7 @@ var sys = require('sys'),
http = require('http');
server = http.createServer(function (req, res) {
- sys.puts('got request. setting 1 second timeout');
+ console.log('got request. setting 1 second timeout');
req.connection.setTimeout(500);
req.connection.addListener('timeout', function(){
@@ -13,7 +13,7 @@ server = http.createServer(function (req, res) {
});
server.listen(PORT, function () {
- sys.puts('Server running at http://127.0.0.1:'+PORT+'/');
+ console.log('Server running at http://127.0.0.1:'+PORT+'/');
errorTimer =setTimeout(function () {
throw new Error('Timeout was not sucessful');
@@ -21,6 +21,6 @@ server.listen(PORT, function () {
http.cat('http://localhost:'+PORT+'/', 'utf8', function (err, content) {
clearTimeout(errorTimer);
- sys.puts('HTTP REQUEST COMPLETE (this is good)');
+ console.log('HTTP REQUEST COMPLETE (this is good)');
});
});
diff --git a/test/simple/test-http-tls.js b/test/simple/test-http-tls.js
index 11845da15c..db4ce90eca 100644
--- a/test/simple/test-http-tls.js
+++ b/test/simple/test-http-tls.js
@@ -14,7 +14,7 @@ try {
have_openssl=true;
} catch (e) {
have_openssl=false;
- puts("Not compiled with OPENSSL support.");
+ console.log("Not compiled with OPENSSL support.");
process.exit();
}
@@ -61,7 +61,7 @@ var https_server = http.createServer(function (req, res) {
if (req.id == 3) {
assert.equal("bar", req.headers['x-x']);
this.close();
- //puts("server closed");
+ //console.log("server closed");
}
setTimeout(function () {
res.writeHead(200, {"Content-Type": "text/plain"});
diff --git a/test/simple/test-http-wget.js b/test/simple/test-http-wget.js
index 47e215e1dd..98ea43fc20 100644
--- a/test/simple/test-http-wget.js
+++ b/test/simple/test-http-wget.js
@@ -39,19 +39,19 @@ c.addListener("connect", function () {
});
c.addListener("data", function (chunk) {
- puts(chunk);
+ console.log(chunk);
server_response += chunk;
});
c.addListener("end", function () {
client_got_eof = true;
- puts('got end');
+ console.log('got end');
c.end();
});
c.addListener("close", function () {
connection_was_closed = true;
- puts('got close');
+ console.log('got close');
server.close();
});
diff --git a/test/simple/test-http-write-empty-string.js b/test/simple/test-http-write-empty-string.js
index 2ccce5959b..3b430c8b6c 100644
--- a/test/simple/test-http-write-empty-string.js
+++ b/test/simple/test-http-write-empty-string.js
@@ -5,7 +5,7 @@ http = require('http');
assert = require('assert');
server = http.createServer(function (request, response) {
- sys.puts('responding to ' + request.url);
+ console.log('responding to ' + request.url);
response.writeHead(200, {'Content-Type': 'text/plain'});
response.write('1\n');
diff --git a/test/simple/test-memory-usage.js b/test/simple/test-memory-usage.js
index 8efe0f5913..0d455466d3 100644
--- a/test/simple/test-memory-usage.js
+++ b/test/simple/test-memory-usage.js
@@ -1,6 +1,6 @@
require("../common");
var r = process.memoryUsage();
-puts(inspect(r));
+console.log(inspect(r));
assert.equal(true, r["rss"] > 0);
assert.equal(true, r["vsize"] > 0);
diff --git a/test/simple/test-mkdir-rmdir.js b/test/simple/test-mkdir-rmdir.js
index 1464370ce6..1a31bf3262 100644
--- a/test/simple/test-mkdir-rmdir.js
+++ b/test/simple/test-mkdir-rmdir.js
@@ -11,16 +11,16 @@ var rmdir_error = false;
fs.mkdir(d, 0666, function (err) {
if (err) {
- puts("mkdir error: " + err.message);
+ console.log("mkdir error: " + err.message);
mkdir_error = true;
} else {
- puts("mkdir okay!");
+ console.log("mkdir okay!");
fs.rmdir(d, function (err) {
if (err) {
- puts("rmdir error: " + err.message);
+ console.log("rmdir error: " + err.message);
rmdir_error = true;
} else {
- puts("rmdir okay!");
+ console.log("rmdir okay!");
}
});
}
@@ -29,5 +29,5 @@ fs.mkdir(d, 0666, function (err) {
process.addListener("exit", function () {
assert.equal(false, mkdir_error);
assert.equal(false, rmdir_error);
- puts("exit");
+ console.log("exit");
});
diff --git a/test/simple/test-module-loading.js b/test/simple/test-module-loading.js
index 460c794267..220c3d163c 100644
--- a/test/simple/test-module-loading.js
+++ b/test/simple/test-module-loading.js
@@ -113,5 +113,5 @@ process.addListener("exit", function () {
assert.equal(true, errorThrownAsync);
- puts("exit");
+ console.log("exit");
});
diff --git a/test/simple/test-net-binary.js b/test/simple/test-net-binary.js
index 9dc347a429..ad6f4f04a5 100644
--- a/test/simple/test-net-binary.js
+++ b/test/simple/test-net-binary.js
@@ -57,17 +57,17 @@ c.addListener("close", function () {
});
process.addListener("exit", function () {
- puts("recv: " + JSON.stringify(recv));
+ console.log("recv: " + JSON.stringify(recv));
assert.equal(2*256, recv.length);
var a = recv.split("");
var first = a.slice(0,256).reverse().join("");
- puts("first: " + JSON.stringify(first));
+ console.log("first: " + JSON.stringify(first));
var second = a.slice(256,2*256).join("");
- puts("second: " + JSON.stringify(second));
+ console.log("second: " + JSON.stringify(second));
assert.equal(first, second);
});
diff --git a/test/simple/test-net-pingpong.js b/test/simple/test-net-pingpong.js
index d715e2c2b8..cc8a0c255d 100644
--- a/test/simple/test-net-pingpong.js
+++ b/test/simple/test-net-pingpong.js
@@ -10,7 +10,7 @@ function pingPongTest (port, host) {
var sent_final_ping = false;
var server = net.createServer(function (socket) {
- puts("connection: " + socket.remoteAddress);
+ console.log("connection: " + socket.remoteAddress);
assert.equal(server, socket.server);
socket.setNoDelay();
@@ -18,7 +18,7 @@ function pingPongTest (port, host) {
socket.setEncoding('utf8');
socket.addListener("data", function (data) {
- puts("server got: " + data);
+ console.log("server got: " + data);
assert.equal(true, socket.writable);
assert.equal(true, socket.readable);
assert.equal(true, count <= N);
@@ -38,7 +38,7 @@ function pingPongTest (port, host) {
});
socket.addListener("close", function () {
- puts('server socket.endd');
+ console.log('server socket.endd');
assert.equal(false, socket.writable);
assert.equal(false, socket.readable);
socket.server.close();
@@ -47,7 +47,7 @@ function pingPongTest (port, host) {
server.listen(port, host, function () {
- puts("server listening on " + port + " " + host);
+ console.log("server listening on " + port + " " + host);
var client = net.createConnection(port, host);
@@ -59,7 +59,7 @@ function pingPongTest (port, host) {
});
client.addListener("data", function (data) {
- puts("client got: " + data);
+ console.log("client got: " + data);
assert.equal("PONG", data);
count += 1;
@@ -83,7 +83,7 @@ function pingPongTest (port, host) {
});
client.addListener("close", function () {
- puts('client.endd');
+ console.log('client.endd');
assert.equal(N+1, count);
assert.equal(true, sent_final_ping);
tests_run += 1;
@@ -103,5 +103,5 @@ pingPongTest("/tmp/pingpong.sock");
process.addListener("exit", function () {
assert.equal(4, tests_run);
- puts('done');
+ console.log('done');
});
diff --git a/test/simple/test-net-reconnect.js b/test/simple/test-net-reconnect.js
index 9b297a7a42..b5be64d205 100644
--- a/test/simple/test-net-reconnect.js
+++ b/test/simple/test-net-reconnect.js
@@ -16,30 +16,30 @@ var server = net.createServer(function (socket) {
});
socket.addListener("close", function (had_error) {
- //puts("server had_error: " + JSON.stringify(had_error));
+ //console.log("server had_error: " + JSON.stringify(had_error));
assert.equal(false, had_error);
});
});
server.listen(PORT, function () {
- puts('listening');
+ console.log('listening');
var client = net.createConnection(PORT);
client.setEncoding("UTF8");
client.addListener("connect", function () {
- puts("client connected.");
+ console.log("client connected.");
});
client.addListener("data", function (chunk) {
client_recv_count += 1;
- puts("client_recv_count " + client_recv_count);
+ console.log("client_recv_count " + client_recv_count);
assert.equal("hello\r\n", chunk);
client.end();
});
client.addListener("close", function (had_error) {
- puts("disconnect");
+ console.log("disconnect");
assert.equal(false, had_error);
if (disconnect_count++ < N)
client.connect(PORT); // reconnect
diff --git a/test/simple/test-net-tls.js b/test/simple/test-net-tls.js
index a5633d0035..b6c1d1195f 100644
--- a/test/simple/test-net-tls.js
+++ b/test/simple/test-net-tls.js
@@ -9,7 +9,7 @@ try {
have_openssl=true;
} catch (e) {
have_openssl=false;
- puts("Not compiled with OPENSSL support.");
+ console.log("Not compiled with OPENSSL support.");
process.exit();
}
diff --git a/test/simple/test-next-tick-ordering.js b/test/simple/test-next-tick-ordering.js
index ee41f055e3..b08e2276e6 100644
--- a/test/simple/test-next-tick-ordering.js
+++ b/test/simple/test-next-tick-ordering.js
@@ -6,13 +6,13 @@ var done = [];
function get_printer(timeout) {
return function () {
- sys.puts("Running from setTimeout " + timeout);
+ console.log("Running from setTimeout " + timeout);
done.push(timeout);
};
}
process.nextTick(function () {
- sys.puts("Running from nextTick");
+ console.log("Running from nextTick");
done.push('nextTick');
})
@@ -20,7 +20,7 @@ for (i = 0; i < N; i += 1) {
setTimeout(get_printer(i), i);
}
-sys.puts("Running from main.");
+console.log("Running from main.");
process.addListener('exit', function () {
diff --git a/test/simple/test-readdir.js b/test/simple/test-readdir.js
index c90fe37359..b1881fcf22 100644
--- a/test/simple/test-readdir.js
+++ b/test/simple/test-readdir.js
@@ -16,16 +16,16 @@ var files = ['are'
];
-puts('readdirSync ' + readdirDir);
+console.log('readdirSync ' + readdirDir);
var f = fs.readdirSync(readdirDir);
p(f);
assert.deepEqual(files, f.sort());
-puts("readdir " + readdirDir);
+console.log("readdir " + readdirDir);
fs.readdir(readdirDir, function (err, f) {
if (err) {
- puts("error");
+ console.log("error");
got_error = true;
} else {
p(f);
@@ -35,5 +35,5 @@ fs.readdir(readdirDir, function (err, f) {
process.addListener("exit", function () {
assert.equal(false, got_error);
- puts("exit");
+ console.log("exit");
});
diff --git a/test/simple/test-regression-object-prototype.js b/test/simple/test-regression-object-prototype.js
index 7c6f45138f..913e12053c 100644
--- a/test/simple/test-regression-object-prototype.js
+++ b/test/simple/test-regression-object-prototype.js
@@ -1,8 +1,8 @@
var sys = require('sys');
-//sys.puts('puts before');
+//console.log('puts before');
Object.prototype.xadsadsdasasdxx = function () {
};
-sys.puts('puts after');
+console.log('puts after');
diff --git a/test/simple/test-signal-handler.js b/test/simple/test-signal-handler.js
index 5e772d192a..50d37c0379 100644
--- a/test/simple/test-signal-handler.js
+++ b/test/simple/test-signal-handler.js
@@ -1,26 +1,26 @@
require("../common");
-puts("process.pid: " + process.pid);
+console.log("process.pid: " + process.pid);
var first = 0,
second = 0;
process.addListener('SIGUSR1', function () {
- puts("Interrupted by SIGUSR1");
+ console.log("Interrupted by SIGUSR1");
first += 1;
});
process.addListener('SIGUSR1', function () {
second += 1;
setTimeout(function () {
- puts("End.");
+ console.log("End.");
process.exit(0);
}, 5);
});
i = 0;
setInterval(function () {
- puts("running process..." + ++i);
+ console.log("running process..." + ++i);
if (i == 5) {
process.kill(process.pid, "SIGUSR1");
diff --git a/test/simple/test-signal-unregister.js b/test/simple/test-signal-unregister.js
index 29ce09df5c..ee4fcf8235 100644
--- a/test/simple/test-signal-unregister.js
+++ b/test/simple/test-signal-unregister.js
@@ -13,14 +13,14 @@ child.addListener('exit', function () {
});
setTimeout(function () {
- sys.puts("Sending SIGINT");
+ console.log("Sending SIGINT");
child.kill("SIGINT");
setTimeout(function () {
- sys.puts("Chance has been given to die");
+ console.log("Chance has been given to die");
done = true;
if (!childKilled) {
// Cleanup
- sys.puts("Child did not die on SIGINT, sending SIGTERM");
+ console.log("Child did not die on SIGINT, sending SIGTERM");
child.kill("SIGTERM");
}
}, 200);
diff --git a/test/simple/test-stdin-from-file.js b/test/simple/test-stdin-from-file.js
index 0c7e8f7a8f..7e4a4458b7 100644
--- a/test/simple/test-stdin-from-file.js
+++ b/test/simple/test-stdin-from-file.js
@@ -13,7 +13,7 @@ string = "abc\nümlaut.\nsomething else\n"
+ "南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,疆域包括今天中国的广东、广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n";
-puts(cmd + "\n\n");
+console.log(cmd + "\n\n");
try {
fs.unlinkSync(tmpFile);
@@ -25,7 +25,7 @@ childProccess.exec(cmd, function(err, stdout, stderr) {
fs.unlinkSync(tmpFile);
if (err) throw err;
- puts(stdout);
+ console.log(stdout);
assert.equal(stdout, "hello world\r\n" + string);
assert.equal("", stderr);
});
diff --git a/test/simple/test-stdout-to-file.js b/test/simple/test-stdout-to-file.js
index 5c611bfe49..3df3bfad1f 100644
--- a/test/simple/test-stdout-to-file.js
+++ b/test/simple/test-stdout-to-file.js
@@ -25,11 +25,11 @@ function test (size, useBuffer, cb) {
childProccess.exec(cmd, function(err) {
if (err) throw err;
- puts('done!');
+ console.log('done!');
var stat = fs.statSync(tmpFile);
- puts(tmpFile + ' has ' + stat.size + ' bytes');
+ console.log(tmpFile + ' has ' + stat.size + ' bytes');
assert.equal(size, stat.size);
fs.unlinkSync(tmpFile);
@@ -40,9 +40,9 @@ function test (size, useBuffer, cb) {
finished = false;
test(1024*1024, false, function () {
- puts("Done printing with string");
+ console.log("Done printing with string");
test(1024*1024, true, function () {
- puts("Done printing with buffer");
+ console.log("Done printing with buffer");
finished = true;
});
});
diff --git a/test/simple/test-string-decoder.js b/test/simple/test-string-decoder.js
index fd5267537e..1f61d5c238 100644
--- a/test/simple/test-string-decoder.js
+++ b/test/simple/test-string-decoder.js
@@ -59,5 +59,5 @@ for (var j = 2; j < buffer.length; j++) {
print(".");
}
}
-puts(" crayon!");
+console.log(" crayon!");
diff --git a/test/simple/test-utf8-scripts.js b/test/simple/test-utf8-scripts.js
index a3b46e1dcc..6861c7e485 100644
--- a/test/simple/test-utf8-scripts.js
+++ b/test/simple/test-utf8-scripts.js
@@ -2,7 +2,7 @@ require("../common");
// üäö
-puts("Σὲ γνωρίζω ἀπὸ τὴν κόψη");
+console.log("Σὲ γνωρίζω ἀπὸ τὴν κόψη");
assert.equal(true, /Hellö Wörld/.test("Hellö Wörld") );