From: Feross Aboukhadijeh Date: Tue, 8 Apr 2014 07:54:22 +0000 (-0700) Subject: Merge branch 'master' of github.com:devongovett/buffer into devongovett-master X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=c841a70c907849223454abac1d7ce7234797fa78;p=buffer.git Merge branch 'master' of github.com:devongovett/buffer into devongovett-master --- c841a70c907849223454abac1d7ce7234797fa78 diff --cc test/buffer.js index 076b3be,a7bb690..9fdfea1 --- a/test/buffer.js +++ b/test/buffer.js @@@ -233,9 -253,25 +233,25 @@@ test('copy() empty buffer with sourceEn t.end() }) + test('copy() after slice()', function(t) { + t.plan(1) + var source = new B(200) + var dest = new B(200) + var expected = new B(200) + for (var i = 0; i < 200; i++) { + source[i] = i + dest[i] = 0 + } + + source.slice(2).copy(dest) + source.copy(expected, 0, 2) + t.deepEqual(dest, expected) + t.end() + }) + test('base64 ignore whitespace', function(t) { t.plan(1) - var text = "\n YW9ldQ== " + var text = '\n YW9ldQ== ' var buf = new B(text, 'base64') t.equal(buf.toString(), 'aoeu') t.end()