mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-21 09:07:56 +03:00
ae21e51b40
Fixes #6110
41 lines
926 B
TypeScript
41 lines
926 B
TypeScript
import * as assert from 'assert';
|
|
|
|
import { Notation } from '../../src/configuration/notation';
|
|
|
|
suite('Notation', () => {
|
|
test('Normalize', () => {
|
|
const leaderKey = '//';
|
|
const testCases = {
|
|
'<cTrL+w>': '<C-w>',
|
|
'cTrL+x': '<C-x>',
|
|
'CtRl+y': '<C-y>',
|
|
'c-z': '<C-z>',
|
|
'<CmD+a>': '<D-a>',
|
|
eScapE: '<Esc>',
|
|
hOme: '<Home>',
|
|
inSert: '<Insert>',
|
|
eNd: '<End>',
|
|
'<LeAder>': '//',
|
|
LEaDer: '//',
|
|
'<cR>': '\n',
|
|
'<EnTeR>': '\n',
|
|
'<space>': ' ',
|
|
'<uP>': '<up>',
|
|
'<Shift+Tab>': '<S-tab>',
|
|
'<S-j>': 'J',
|
|
'<S-J>': 'J',
|
|
'<s-j>': 'J',
|
|
'<s-J>': 'J',
|
|
};
|
|
|
|
for (const test in testCases) {
|
|
if (testCases.hasOwnProperty(test)) {
|
|
const expected = testCases[test];
|
|
|
|
const actual = Notation.NormalizeKey(test, leaderKey);
|
|
assert.strictEqual(actual, expected);
|
|
}
|
|
}
|
|
});
|
|
});
|