diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 02:09:18 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 02:09:29 +0100 |
| commit | 04f2f864e270e772c6326cefdf24947f0130e492 (patch) | |
| tree | 46f83f909b888a66c741032ab955afc6eab84292 /test/functional/ex_cmds/map_spec.lua | |
| parent | 59d117ec99b6037cb9fad5bbfb6d0b18f5012927 (diff) | |
| download | rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.gz rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.bz2 rneovim-04f2f864e270e772c6326cefdf24947f0130e492.zip | |
refactor: format test/*
Diffstat (limited to 'test/functional/ex_cmds/map_spec.lua')
| -rw-r--r-- | test/functional/ex_cmds/map_spec.lua | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/test/functional/ex_cmds/map_spec.lua b/test/functional/ex_cmds/map_spec.lua index c8855337ef..934dac6a2d 100644 --- a/test/functional/ex_cmds/map_spec.lua +++ b/test/functional/ex_cmds/map_spec.lua @@ -1,4 +1,4 @@ -local helpers = require("test.functional.helpers")(after_each) +local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local eq = helpers.eq @@ -33,23 +33,27 @@ describe(':*map', function() it('shows <Nop> as mapping rhs', function() command('nmap asdf <Nop>') - eq([[ + eq( + [[ n asdf <Nop>]], - exec_capture('nmap asdf')) + exec_capture('nmap asdf') + ) end) it('mappings with description can be filtered', function() - meths.set_keymap('n', 'asdf1', 'qwert', {desc='do the one thing'}) - meths.set_keymap('n', 'asdf2', 'qwert', {desc='doesnot really do anything'}) - meths.set_keymap('n', 'asdf3', 'qwert', {desc='do the other thing'}) - eq([[ + meths.set_keymap('n', 'asdf1', 'qwert', { desc = 'do the one thing' }) + meths.set_keymap('n', 'asdf2', 'qwert', { desc = 'doesnot really do anything' }) + meths.set_keymap('n', 'asdf3', 'qwert', { desc = 'do the other thing' }) + eq( + [[ n asdf3 qwert do the other thing n asdf1 qwert do the one thing]], - exec_capture('filter the nmap')) + exec_capture('filter the nmap') + ) end) it('<Plug> mappings ignore nore', function() @@ -75,7 +79,7 @@ n asdf1 qwert nmap increase_x_remap x<Plug>(Increase_x)x nnoremap increase_x_noremap x<Plug>(Increase_x)x ]] - insert("Some text") + insert('Some text') eq('Some text', eval("getline('.')")) feed('increase_x_remap') |