cover Vim edit-ops and extension edge branches

Lift line coverage back over the 95% floor after the Flutter 3.44.1
merge nudged it to 94.99%. Adds tests for the changeWord/no-op-edit/
empty-paste/word-motion-edge branches in vim_edit_ops, the lone-key
flush path in SequenceMatcher, and the keybindings-ui / vim extension
identity + deactivate paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 10:48:27 +02:00
co-authored by Claude Opus 4.8
parent ec67f3323a
commit adcc79c9a5
4 changed files with 65 additions and 0 deletions
@@ -17,6 +17,20 @@ void main() {
});
tearDown(() => f.dispose());
test('identifies itself', () {
final ext = KeybindingsUiExtension();
expect(ext.id, 'builtin.keybindings-ui');
expect(ext.title, 'Keybindings UI');
expect(ext.version, '0.1.0');
});
test('deactivate drops the keymap reference', () async {
await f.services.extensions.deactivate('builtin.keybindings-ui');
// Re-activating is clean (no retained state).
await f.services.extensions.activate('builtin.keybindings-ui');
expect(f.services.commands.get('keymap.preset.vim'), isNotNull);
});
test('contributes a switch command per shipped preset', () {
expect(f.services.commands.get('keymap.preset.vim'), isNotNull);
expect(f.services.commands.get('keymap.preset.default'), isNotNull);