|
|
@ -58,6 +58,16 @@ describe('BufferReader', function() { |
|
|
|
br.read().toString('hex').should.equal(buf.toString('hex')); |
|
|
|
}); |
|
|
|
|
|
|
|
it('should return a buffer of this length', function() { |
|
|
|
var buf = new Buffer(10); |
|
|
|
buf.fill(0); |
|
|
|
var br = new BufferReader(buf); |
|
|
|
var buf2 = br.read(2); |
|
|
|
buf2.length.should.equal(2); |
|
|
|
br.eof().should.equal(false); |
|
|
|
br.pos.should.equal(2); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
describe('#readUInt8', function() { |
|
|
|