mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure support for wide-char filenames on Windows #4391
This commit is contained in:
@@ -1036,4 +1036,21 @@ describe('Input/output', function () {
|
||||
});
|
||||
readable.pipe(inPipeline).pipe(badPipeline);
|
||||
});
|
||||
|
||||
it('supports wide-character filenames', async () => {
|
||||
const filename = fixtures.path('output.图片.jpg');
|
||||
const create = {
|
||||
width: 8,
|
||||
height: 8,
|
||||
channels: 3,
|
||||
background: 'green'
|
||||
};
|
||||
await sharp({ create }).toFile(filename);
|
||||
|
||||
const { width, height, channels, format } = await sharp(filename).metadata();
|
||||
assert.strictEqual(width, 8);
|
||||
assert.strictEqual(height, 8);
|
||||
assert.strictEqual(channels, 3);
|
||||
assert.strictEqual(format, 'jpeg');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user