mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-05 19:31:01 +01:00
Added raw inflate tests for #22
This commit is contained in:
parent
e93c614f7a
commit
8cbe85f55f
5 changed files with 9 additions and 2 deletions
BIN
test/fixtures/samples_deflated_raw/sheet2.compressed
vendored
Normal file
BIN
test/fixtures/samples_deflated_raw/sheet2.compressed
vendored
Normal file
Binary file not shown.
BIN
test/fixtures/samples_deflated_raw/sheet3.compressed
vendored
Normal file
BIN
test/fixtures/samples_deflated_raw/sheet3.compressed
vendored
Normal file
Binary file not shown.
BIN
test/fixtures/samples_deflated_raw/sheet4.compressed
vendored
Normal file
BIN
test/fixtures/samples_deflated_raw/sheet4.compressed
vendored
Normal file
Binary file not shown.
|
@ -12,9 +12,9 @@ var pako = require('../index');
|
|||
// Load fixtures to test
|
||||
// return: { 'filename1': content1, 'filename2': content2, ...}
|
||||
//
|
||||
function loadSamples() {
|
||||
function loadSamples(subdir) {
|
||||
var result = {};
|
||||
var dir = path.join(__dirname, 'fixtures/samples');
|
||||
var dir = path.join(__dirname, 'fixtures', subdir || 'samples');
|
||||
|
||||
fs.readdirSync(dir).sort().forEach(function (sample) {
|
||||
var filepath = path.join(dir, sample),
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
'use strict';
|
||||
|
||||
|
||||
var zlib = require('zlib');
|
||||
|
||||
var pako = require('../index');
|
||||
var helpers = require('./helpers');
|
||||
var testInflate = helpers.testInflate;
|
||||
|
||||
|
@ -21,6 +24,10 @@ describe('Inflate defaults', function () {
|
|||
testInflate(samples, { raw: true }, { raw: true }, done);
|
||||
});
|
||||
|
||||
it.skip('inflate raw from compressed samples', function(done) {
|
||||
var compressed_samples = helpers.loadSamples('samples_deflated_raw');
|
||||
helpers.testDeflate(zlib.createInflateRaw, pako.inflateRaw, compressed_samples, {}, done);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue