node/test/fixtures/echo.js

15 lines
281 B
JavaScript
Raw Normal View History

common = require("../common");
2010-10-07 11:05:23 +08:00
assert = common.assert;
common.print("hello world\r\n");
2010-03-18 05:00:17 +08:00
var stdin = process.openStdin();
stdin.addListener("data", function (data) {
2010-04-20 06:22:59 +08:00
process.stdout.write(data.toString());
});
2010-03-18 05:00:17 +08:00
stdin.addListener("end", function () {
2010-04-20 06:22:59 +08:00
process.stdout.end();
});