Skip to content

Commit c212efa

Browse files
author
Benjamin Pasero
committed
encodings - failing test for microsoft#101847
1 parent 10a3aef commit c212efa

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/vs/workbench/services/textfile/test/node/encoding/encoding.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import * as streams from 'vs/base/common/stream';
1111
import * as iconv from 'iconv-lite-umd';
1212
import { getPathFromAmdModule } from 'vs/base/common/amd';
1313
import { newWriteableBufferStream, VSBuffer, VSBufferReadableStream, streamToBufferReadableStream } from 'vs/base/common/buffer';
14+
import { SUPPORTED_ENCODINGS } from 'vs/workbench/services/textfile/common/textfiles';
1415

1516
export async function detectEncodingByBOM(file: string): Promise<typeof encoding.UTF16be | typeof encoding.UTF16le | typeof encoding.UTF8_with_bom | null> {
1617
try {
@@ -399,4 +400,18 @@ suite('Encoding', () => {
399400
assert.equal(actual, expected);
400401
});
401402
});
403+
404+
test('encodingExists', async function () {
405+
for (const enc in SUPPORTED_ENCODINGS) {
406+
if (enc === encoding.UTF8_with_bom) {
407+
continue; // skip over encodings from us
408+
}
409+
410+
if (enc === 'euckr') {
411+
continue; // TODO@ben failing test for https://github.com/microsoft/vscode/issues/101847
412+
}
413+
414+
assert.equal(iconv.encodingExists(enc), true, enc);
415+
}
416+
});
402417
});

0 commit comments

Comments
 (0)