mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
avoid segfault with unknown interpolator
This commit is contained in:
@@ -93,4 +93,16 @@ describe('Interpolation', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('unknown interpolator throws', function(done) {
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.interpolateWith('nonexistant')
|
||||
.toBuffer()
|
||||
.catch(function (e) {
|
||||
assert(
|
||||
e.toString().match(/VipsInterpolate: class "nonexistant" not found/)
|
||||
);
|
||||
})
|
||||
.finally(done);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user