Skip to content

Commit

Permalink
add header generation from gnutar 10gb file
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jun 1, 2019
1 parent 9a44de7 commit 91b9ee9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,3 +590,26 @@ t.test('null block, global extended header', t => {
})
t.end()
})

t.test('gnutar-generated 10gb file size', t => {
const b = Buffer.from(
'313067622e696d67000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000030303030363634003030303137353000303030313735300080000000' +
'0000000280000000313334373434303132303500303131313437002030000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0075737461722020006973616163730000000000000000000000000000000000' +
'0000000000000000006973616163730000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000' +
'0000000000000000000000000000000000000000000000000000000000000000', 'hex')
const h = new Header(b)
t.equal(h.size, 1024 * 1024 * 1024 * 10, 'should be 10gb file')
t.end()
})

0 comments on commit 91b9ee9

Please sign in to comment.