mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-26 02:06:38 +01:00
textfile - add test for UTF16 without bom
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -556,6 +556,20 @@ suite('Files - TextFileService i/o', () => {
|
||||
assert.ok(contents.indexOf(needle, 10) > 0);
|
||||
}
|
||||
|
||||
test('readStream - UTF16 LE (no BOM)', async () => {
|
||||
const resource = URI.file(join(testDir, 'utf16_le_nobom.txt'));
|
||||
|
||||
const result = await service.readStream(resource);
|
||||
assert.equal(result.encoding, 'utf16le');
|
||||
});
|
||||
|
||||
test('readStream - UTF16 BE (no BOM)', async () => {
|
||||
const resource = URI.file(join(testDir, 'utf16_be_nobom.txt'));
|
||||
|
||||
const result = await service.readStream(resource);
|
||||
assert.equal(result.encoding, 'utf16be');
|
||||
});
|
||||
|
||||
test('readStream - FILE_IS_BINARY', async () => {
|
||||
const resource = URI.file(join(testDir, 'binary.txt'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user