Expose fast-buffer bug in tests

v0.7.4-release
Ryan Dahl 2010-09-07 21:40:15 -07:00
parent ff027d571b
commit 8078ed1f86
1 changed files with 16 additions and 0 deletions

View File

@ -294,3 +294,19 @@ assert.equal(dot[1], 0xfe);
assert.equal(dot[2], 0x2e);
assert.equal(dot[3], 0x00);
assert.equal(dot.toString('base64'), '//4uAA==');
// Creating buffers larger than pool size.
s = ""
for (i = 0; i < Buffer.poolSize + 5; i++) {
s += "h";
}
b = Buffer(s);
sb = b.toString();
assert.equal(sb, s);