node/test/fixtures/print-chars-from-buffer.js

13 lines
218 B
JavaScript
Raw Normal View History

2010-12-03 09:03:18 +08:00
common = require('../common');
assert = common.assert;
Buffer = require('buffer').Buffer;
var n = parseInt(process.argv[2]);
b = new Buffer(n);
2010-12-03 09:03:18 +08:00
for (var i = 0; i < n; i++) {
b[i] = 100;
}
process.stdout.write(b);