i-dont-know fixture
This commit is contained in:
parent
6ed3778c66
commit
1e384904b9
4 changed files with 25 additions and 0 deletions
|
@ -676,6 +676,26 @@ test('gnu-incremental', function (t) {
|
||||||
extract.end(fs.readFileSync(fixtures.GNU_INCREMENTAL_TAR))
|
extract.end(fs.readFileSync(fixtures.GNU_INCREMENTAL_TAR))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('i-dont-know', function (t) {
|
||||||
|
t.plan(1)
|
||||||
|
const extract = tar.extract()
|
||||||
|
|
||||||
|
extract.on('entry', function (header, stream, cb) {
|
||||||
|
console.debug(header.name)
|
||||||
|
stream.on('end', function () {
|
||||||
|
cb() // ready for next entry
|
||||||
|
})
|
||||||
|
|
||||||
|
stream.resume()
|
||||||
|
})
|
||||||
|
|
||||||
|
extract.on('finish', function () {
|
||||||
|
t.ok(true)
|
||||||
|
})
|
||||||
|
|
||||||
|
extract.end(fs.readFileSync(fixtures.I_DONT_KNOW))
|
||||||
|
})
|
||||||
|
|
||||||
test('v7 unsupported', function (t) { // correctly fails to parse v7 tarballs
|
test('v7 unsupported', function (t) { // correctly fails to parse v7 tarballs
|
||||||
t.plan(1)
|
t.plan(1)
|
||||||
|
|
||||||
|
|
1
test/fixtures/.gitattributes
vendored
Normal file
1
test/fixtures/.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
i-dont-know.tgz filter=lfs diff=lfs merge=lfs -text
|
BIN
test/fixtures/i-dont-know.tgz
(Stored with Git LFS)
vendored
Normal file
BIN
test/fixtures/i-dont-know.tgz
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
1
test/fixtures/index.js
vendored
1
test/fixtures/index.js
vendored
|
@ -25,3 +25,4 @@ exports.GNU_INCREMENTAL_TAR = path.join(__dirname, 'gnu-incremental.tar')
|
||||||
exports.UNKNOWN_FORMAT = path.join(__dirname, 'unknown-format.tar')
|
exports.UNKNOWN_FORMAT = path.join(__dirname, 'unknown-format.tar')
|
||||||
// Created using gnu tar: tar cf v7.tar --format v7 test.txt
|
// Created using gnu tar: tar cf v7.tar --format v7 test.txt
|
||||||
exports.V7_TAR = path.join(__dirname, 'v7.tar')
|
exports.V7_TAR = path.join(__dirname, 'v7.tar')
|
||||||
|
exports.I_DONT_KNOW = path.join(__dirname, 'i-dont-know.tgz')
|
||||||
|
|
Loading…
Reference in a new issue