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

11 lines
164 B
JavaScript

var assert = require('assert');
var n = parseInt(process.argv[2]);
var b = new Buffer(n);
for (var i = 0; i < n; i++) {
b[i] = 100;
}
process.stdout.write(b);