projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff027d5
)
Expose fast-buffer bug in tests
author
Ryan Dahl
<ry@tinyclouds.org>
Wed, 8 Sep 2010 04:40:15 +0000
(21:40 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Thu, 9 Sep 2010 18:03:50 +0000
(11:03 -0700)
test/simple/test-buffer.js
patch
|
blob
|
history
diff --git
a/test/simple/test-buffer.js
b/test/simple/test-buffer.js
index
80fd1b0
..
abe4e15
100644
(file)
--- a/
test/simple/test-buffer.js
+++ b/
test/simple/test-buffer.js
@@
-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);
+
+
+
+
+
+