Permalink
Browse files

Add close() to the test debugging.

  • Loading branch information...
1 parent e22ffcd commit a8cfbf3ba0148b8ffad10595d4199ac49c0e38ad @isaacs committed Jan 27, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/test.js
View
4 test/test.js
@@ -9,10 +9,14 @@ var s1 = new Stream(),
s3 = new Stream(),
out = "";
s1.addListener("data", function (chunk) { s2.write(chunk) });
+s1.addListener("eof", function () { s2.close() });
s2.addListener("data", function (chunk) { s3.write(chunk) });
+s2.addListener("eof", function () { s3.close(); s3.close(); s3.close(); });
s3.addListener("data", function (chunk) { chunk && (out += chunk + " ") });
s2.addListener("drain", function () { out += "\n--DRAIN--\n" });
+s2.addListener("eof", function () { out += "\n--s3 EOF--\n" });
+
function message () {
out += "-1-";

0 comments on commit a8cfbf3

Please sign in to comment.