mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-07 14:37:29 +00:00
Test for reading in UTF-16BE.
This commit is contained in:
parent
9fa24e2f6f
commit
3e030debd3
3 changed files with 12 additions and 0 deletions
5
developer/js/tests/fixtures/example.qaa.utf16be/model.ts
vendored
Normal file
5
developer/js/tests/fixtures/example.qaa.utf16be/model.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
const source: LexicalModelSource = {
|
||||
format: 'trie-1.0',
|
||||
sources: ['wordlist.txt'],
|
||||
};
|
||||
export default source;
|
||||
BIN
developer/js/tests/fixtures/example.qaa.utf16be/wordlist.txt
vendored
Normal file
BIN
developer/js/tests/fixtures/example.qaa.utf16be/wordlist.txt
vendored
Normal file
Binary file not shown.
|
|
@ -26,5 +26,12 @@ describe('parseWordList', function () {
|
|||
let wordlist = parseWordListFromFilename(filename);
|
||||
assert.lengthOf(wordlist, 10);
|
||||
});
|
||||
|
||||
it('should read wordlists in UTF-16 LE (with BOM)', function () {
|
||||
// N.B.: this format... might be output by MS Excel? Maybe?
|
||||
const filename = makePathToFixture('example.qaa.utf16be', 'wordlist.txt');
|
||||
let wordlist = parseWordListFromFilename(filename);
|
||||
assert.lengthOf(wordlist, 10);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue