mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 02:30:12 +02:00
Add test case for require-time libc++ segfault
This commit is contained in:
parent
409d15c624
commit
5b376364f5
@ -59,7 +59,8 @@
|
||||
"mocha": "^2.2.5",
|
||||
"mocha-jshint": "^2.2.3",
|
||||
"node-cpplint": "^0.4.0",
|
||||
"rimraf": "^2.4.2"
|
||||
"rimraf": "^2.4.2",
|
||||
"bufferutil": "^1.2.1"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
|
@ -16,7 +16,7 @@ describe('Gamma correction', function() {
|
||||
assert.strictEqual('jpeg', info.format);
|
||||
assert.strictEqual(129, info.width);
|
||||
assert.strictEqual(111, info.height);
|
||||
fixtures.assertSimilar(fixtures.expected('gamma-0.0.jpg'), data, done);
|
||||
fixtures.assertSimilar(fixtures.expected('gamma-0.0.jpg'), data, {threshold: 12}, done);
|
||||
});
|
||||
});
|
||||
|
||||
|
15
test/unit/require.js
Normal file
15
test/unit/require.js
Normal file
@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
describe('Require-time checks', function() {
|
||||
|
||||
/*
|
||||
Including sharp alongside another C++ module that does not require
|
||||
-stdlib=libc++ (for its C++11 features) has caused clang/llvm to
|
||||
segfault due to the use of static function variables.
|
||||
*/
|
||||
it('Require alongside C++ module that does not use libc++', function() {
|
||||
var bufferutil = require('bufferutil');
|
||||
var sharp = require('../../index');
|
||||
});
|
||||
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user