1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
Description: Replace deprecated sys.puts
Author: Xavier Guimard <yadd@debian.org>
Forwarded: no
Last-Update: 2019-02-04
--- a/example/demo.js
+++ b/example/demo.js
@@ -4,11 +4,11 @@
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
- sys.puts("State: " + this.readyState);
+ console.log("State: " + this.readyState);
if (this.readyState === 4) {
- sys.puts("Complete.\nBody length: " + this.responseText.length);
- sys.puts("Body:\n" + this.responseText);
+ console.log("Complete.\nBody length: " + this.responseText.length);
+ console.log("Body:\n" + this.responseText);
}
};
--- a/tests/test-constants.js
+++ b/tests/test-constants.js
@@ -10,4 +10,4 @@
assert.equal(3, xhr.LOADING);
assert.equal(4, xhr.DONE);
-sys.puts("done");
+console.log("done");
--- a/tests/test-events.js
+++ b/tests/test-events.js
@@ -20,7 +20,7 @@
assert.equal(onreadystatechange, true);
assert.equal(readystatechange, true);
assert.equal(removed, true);
- sys.puts("done");
+ console.log("done");
this.close();
}).listen(8000);
--- a/tests/test-headers.js
+++ b/tests/test-headers.js
@@ -47,7 +47,7 @@
assert.equal("", this.getAllResponseHeaders());
assert.equal(null, this.getResponseHeader("Connection"));
- sys.puts("done");
+ console.log("done");
}
};
--- a/tests/test-redirect-301.js
+++ b/tests/test-redirect-301.js
@@ -30,7 +30,7 @@
assert.equal(xhr.status, 200);
assert.equal(xhr.getRequestHeader('Location'), '');
assert.equal(xhr.responseText, "Hello World");
- sys.puts("done");
+ console.log("done");
}
};
--- a/tests/test-redirect-302.js
+++ b/tests/test-redirect-302.js
@@ -29,7 +29,7 @@
if (this.readyState == 4) {
assert.equal(xhr.getRequestHeader('Location'), '');
assert.equal(xhr.responseText, "Hello World");
- sys.puts("done");
+ console.log("done");
}
};
--- a/tests/test-redirect-303.js
+++ b/tests/test-redirect-303.js
@@ -29,7 +29,7 @@
if (this.readyState == 4) {
assert.equal(xhr.getRequestHeader('Location'), '');
assert.equal(xhr.responseText, "Hello World");
- sys.puts("done");
+ console.log("done");
}
};
--- a/tests/test-redirect-307.js
+++ b/tests/test-redirect-307.js
@@ -31,7 +31,7 @@
if (this.readyState == 4) {
assert.equal(xhr.getRequestHeader('Location'), '');
assert.equal(xhr.responseText, "Hello World");
- sys.puts("done");
+ console.log("done");
}
};
--- a/tests/test-request-methods.js
+++ b/tests/test-request-methods.js
@@ -24,7 +24,7 @@
if (curMethod == methods.length - 1) {
this.close();
- sys.puts("done");
+ console.log("done");
}
}).listen(8000);
@@ -47,7 +47,7 @@
curMethod++;
if (curMethod < methods.length) {
- sys.puts("Testing " + methods[curMethod]);
+ console.log("Testing " + methods[curMethod]);
start(methods[curMethod]);
}
}
@@ -58,5 +58,5 @@
xhr.send();
}
-sys.puts("Testing " + methods[curMethod]);
+console.log("Testing " + methods[curMethod]);
start(methods[curMethod]);
--- a/tests/test-request-protocols.js
+++ b/tests/test-request-protocols.js
@@ -24,7 +24,7 @@
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
assert.equal("Hello World", this.responseText);
- sys.puts("done");
+ console.log("done");
}
};
xhr.open("GET", url, false);
--- a/tests/test-streaming.js
+++ b/tests/test-streaming.js
@@ -12,7 +12,7 @@
assert.equal(readystatechange, true);
assert.equal(removed, true);
assert.equal(loadCount, body.length);
- sys.puts("done");
+ console.log("done");
server.close();
}
function push(res,piece) {
|