Added raw inflate tests for #22

This commit is contained in:
Vitaly Puzrin 2014-05-01 04:06:11 +04:00
parent e93c614f7a
commit 8cbe85f55f
5 changed files with 9 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -12,9 +12,9 @@ var pako = require('../index');
// Load fixtures to test // Load fixtures to test
// return: { 'filename1': content1, 'filename2': content2, ...} // return: { 'filename1': content1, 'filename2': content2, ...}
// //
function loadSamples() { function loadSamples(subdir) {
var result = {}; var result = {};
var dir = path.join(__dirname, 'fixtures/samples'); var dir = path.join(__dirname, 'fixtures', subdir || 'samples');
fs.readdirSync(dir).sort().forEach(function (sample) { fs.readdirSync(dir).sort().forEach(function (sample) {
var filepath = path.join(dir, sample), var filepath = path.join(dir, sample),

View file

@ -4,6 +4,9 @@
'use strict'; 'use strict';
var zlib = require('zlib');
var pako = require('../index');
var helpers = require('./helpers'); var helpers = require('./helpers');
var testInflate = helpers.testInflate; var testInflate = helpers.testInflate;
@ -21,6 +24,10 @@ describe('Inflate defaults', function () {
testInflate(samples, { raw: true }, { raw: true }, done); 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);
});
}); });