Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable tests for Zopfli’s non-gzip output formats (i.e. deflate and zlib) #7

Closed
mathiasbynens opened this issue Jun 16, 2013 · 0 comments

Comments

@mathiasbynens
Copy link
Owner

So, grunt-zopfli runs fine for all kinds of output formats, and the unit tests confirm that the grunt-zopfli’s gzipped output is correct (i.e. it gunzips to the original file).

It’s highly unlikely that grunt-zopfli doesn’t work correctly for Zopfli’s deflate and zlib settings, since it uses the same code paths and everything — only the argument in the shell command is different. But it would be nice to have tests that confirm this.

The disabled tests are here:

// // Test disabled because I have no idea how to decompress Zopfli-generated
// // with the `zlib` setting. I thought `createInflateRaw` (inflate data
// // without zlib header) would work.
// 'test-2': function(test) {
// test.expect(1);
// decompress('tmp/test-2.js.zlib', 'zlib', function(actual) {
// test.equal(
// grunt.file.read('tests/fixtures/benchmark.js'),
// actual,
// 'Benchmark.js, 50 iterations, zlib format'
// );
// test.done();
// });
// },
// 'test-3': function(test) {
// test.expect(1);
// decompress('tmp/test-3.js.deflate', 'deflate', function(actual) {
// test.equal(
// grunt.file.read('tests/fixtures/benchmark.js'),
// actual,
// 'Benchmark.js, 10 iterations, deflate format, perform block splitting last'
// );
// test.done();
// });
// },
// 'test-4': function(test) {
// test.expect(1);
// decompress('tmp/test-4.js.deflate', 'deflate', function(actual) {
// test.equal(
// grunt.file.read('tests/fixtures/benchmark.js'),
// actual,
// 'Benchmark.js, 10 iterations, deflate format, perform block splitting first'
// );
// test.done();
// });
// },

Any ideas how to make this work? /cc @shama @aschmitz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant