Oleg Efimov
0665f0271e
GJSLint all simple tests exclude http-*, url, path
2010-12-05 15:41:58 -08:00
Ryan Dahl
fbdff52b44
Fix global leaks in test-buffer.js
2010-12-04 13:40:21 -08:00
Ryan Dahl
4f32a59307
Fix buffer.slice(0, 0)
2010-11-23 12:20:22 -08:00
Jorge Chamorro Bieling
c735b4663a
unbase64 skips over *any* illegal chars
2010-10-18 15:22:10 -07:00
Ryan Dahl
cf1db4f304
base64 decode should handle whitespace
2010-10-18 11:34:35 -07:00
Ryan Dahl
776754c33f
Remove process._byteLength
2010-09-17 01:06:44 -07:00
Ryan Dahl
77fc61d539
Default value for second arg of Buffer#slice
2010-09-14 15:39:27 -07:00
Ryan Dahl
efc723787a
Fix big string bug
2010-09-09 11:03:50 -07:00
Ryan Dahl
3e9f636b64
Improve long buffer test
2010-09-09 11:03:50 -07:00
Ryan Dahl
8078ed1f86
Expose fast-buffer bug in tests
2010-09-09 11:03:50 -07:00
Ryan Dahl
7b772f3f68
More fast buffer work
2010-09-09 11:03:48 -07:00
Ryan Dahl
d5bdda74c1
fast buffer bounds checking in copy()
2010-09-09 11:03:48 -07:00
Ryan Dahl
f86ad1693f
Safe Constructor: Buffer
2010-08-27 15:23:51 -07:00
Herbert Vojčík
cf2b206a8e
More changes to tests so they really work under context module loader.
...
Plus, getting rid of test/common.js defining things in global.
2010-08-17 08:41:05 -07:00
Ryan Dahl
7db5c8a10d
Fix toString('base64') bug
...
Thanks to Stepan Stolyarov for the test case.
2010-08-04 11:38:48 -07:00
Ben Noordhuis
f72ac17c89
Buffer: graciously handle padding in base64-encoded input.
2010-07-30 10:49:00 -07:00
Ryan Dahl
f291fbc8a7
Fix ending \0 in base64 decoding
2010-07-29 14:52:40 -07:00
Ben Noordhuis
95638c9b0d
Buffer: adjust buffer size so the base64-decoded input fits snugly.
...
Stops Valgrind from complaining about uninitialized memory access.
2010-07-28 11:37:23 -07:00
Dmitry Baranovskiy
8ab3c3e7c3
Added ability to pass offset to buffer write and toString methods as a string, i.e. '2' and encoding as anything
2010-07-25 20:16:37 -07:00
Ryan Dahl
2c1ca4078d
Implement buffer.write for base64
...
There might be an off-by-one on the returned value.
2010-07-23 16:36:52 -07:00
Ryan Dahl
528015e0d8
Implement buffer.toString('base64')
2010-07-23 13:52:44 -07:00
Peter Griess
56f200af5d
Fix Buffer.toString() on 0-length slices.
...
- Buffer.toString('ascii', 0, 0) incorrectly returns the entire contents
of the buffer. Fix this.
- Provide similar behavior to Buffer.write() and Buffer.copy() when
dealing with 0-length in valid and invalid byte ranges.
2010-07-20 15:38:10 -07:00
Ryan Dahl
9fd5e3c89c
Update tests to work with module contexts
2010-07-15 14:21:31 -07:00
Peter Griess
e7c4f8cdaa
Buffer.copy() should liberally allow empty copies.
2010-07-15 10:20:42 -07:00
Ryan Dahl
5e86d01385
Revert "Buffer.copy should copy through sourceEnd, as specified."
...
This reverts commit a2f70da4c9
.
Keep tests modifies a few edge checks on Copy()
2010-06-29 19:40:20 -07:00
Matt Ranney
a2f70da4c9
Buffer.copy should copy through sourceEnd, as specified.
...
Improve test-buffer.js to cover all copy error cases.
Fix off by one error in string_decoder.
2010-06-25 09:10:49 -07:00
Ryan Dahl
ba792ea202
:%s/sys.puts/console.log/g
...
and there was much rejoicing
2010-06-23 20:05:29 -07:00
Felix Geisendörfer
0a539865dd
Support arrays and strings in buffer constructor
...
This is be very useful for testing code that deals with buffers.
2010-05-17 11:19:14 -07:00
Ryan Dahl
b8c0349750
Fix triple buffer slice bug
2010-04-14 00:36:34 -07:00
Ryan Dahl
08a09bb50a
Use some more Binary/F methods for Buffer
2010-04-08 16:31:02 -07:00
Ryan Dahl
53dd9fe200
Fix bug in buffer.utf8Write() which included \u0000
2010-04-05 18:10:36 -07:00
Ryan Dahl
b72ffc0e07
Add buffer.copy
2010-04-04 18:59:40 -07:00
Ryan Dahl
025116f8d0
Move Buffer into own module
2010-03-19 20:58:24 -07:00
Ryan Dahl
e01464373f
Speed up test-buffer
2010-03-19 11:30:51 -07:00
Ryan Dahl
c69d3f4a35
Don't use process.mixin in test-buffer.js
2010-03-09 10:54:01 -08:00
Ryan Dahl
71d237e6a0
Move net2 tests into test/simple
2010-02-26 12:13:33 -08:00