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) {
