Add Alpine Linux packaging test #354

Requires libvips cache to be disabled for tests
Skip tiff/magick tests when format unavailable
This commit is contained in:
Lovell Fuller
2016-02-11 18:30:50 +00:00
parent 6ca2a4a9cd
commit 2a56de69cc
10 changed files with 141 additions and 100 deletions

View File

@@ -65,17 +65,19 @@ describe('Partial image extraction', function() {
});
}
it('TIFF', function(done) {
sharp(fixtures.inputTiff)
.extract({ left: 34, top: 63, width: 341, height: 529 })
.jpeg()
.toBuffer(function(err, data, info) {
if (err) throw err;
assert.strictEqual(341, info.width);
assert.strictEqual(529, info.height);
fixtures.assertSimilar(fixtures.expected('extract.tiff'), data, done);
});
});
if (sharp.format.tiff.output.file) {
it('TIFF', function(done) {
sharp(fixtures.inputTiff)
.extract({ left: 34, top: 63, width: 341, height: 529 })
.jpeg()
.toBuffer(function(err, data, info) {
if (err) throw err;
assert.strictEqual(341, info.width);
assert.strictEqual(529, info.height);
fixtures.assertSimilar(fixtures.expected('extract.tiff'), data, done);
});
});
}
it('Before resize', function(done) {
sharp(fixtures.inputJpg)