Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
parent
cf5b0a9041
commit
a196a714b8
5388 changed files with 2176737 additions and 71701 deletions
28
node_modules/binary/test/get_buffer.js
generated
vendored
Normal file
28
node_modules/binary/test/get_buffer.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
var binary = require('../');
|
||||
var test = require('tap').test;
|
||||
|
||||
test('get buffer', function (t) {
|
||||
t.plan(4);
|
||||
|
||||
var buf = new Buffer([ 4, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]);
|
||||
binary.parse(buf)
|
||||
.word8('a')
|
||||
.buffer('b', 7)
|
||||
.word16lu('c')
|
||||
.tap(function (vars) {
|
||||
t.equal(vars.a, 4);
|
||||
t.equal(
|
||||
vars.b.toString(),
|
||||
new Buffer([ 2, 3, 4, 5, 6, 7, 8 ]).toString()
|
||||
);
|
||||
t.equal(vars.c, 2569);
|
||||
})
|
||||
.buffer('d', 'a')
|
||||
.tap(function (vars) {
|
||||
t.equal(
|
||||
vars.d.toString(),
|
||||
new Buffer([ 11, 12, 13, 14 ]).toString()
|
||||
);
|
||||
})
|
||||
;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue