mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
514 B
29 lines
514 B
15 years ago
|
process.mixin(require("../common"));
|
||
15 years ago
|
|
||
|
var sub = path.join(fixturesDir, 'print-chars.js');
|
||
|
|
||
15 years ago
|
n = 100000;
|
||
15 years ago
|
|
||
15 years ago
|
var child = process.createChildProcess(process.argv[0], [sub, n]);
|
||
15 years ago
|
|
||
15 years ago
|
var count = 0;
|
||
15 years ago
|
|
||
15 years ago
|
child.addListener("error", function (data){
|
||
|
if (data) {
|
||
|
puts("parent stderr: " + data);
|
||
|
assert.ok(false);
|
||
|
}
|
||
15 years ago
|
});
|
||
|
|
||
15 years ago
|
child.addListener("output", function (data){
|
||
|
if (data) {
|
||
|
count += data.length;
|
||
|
puts(count);
|
||
|
}
|
||
|
});
|
||
15 years ago
|
|
||
15 years ago
|
child.addListener("exit", function (data) {
|
||
|
assert.equal(n, count);
|
||
|
puts("okay");
|
||
15 years ago
|
});
|