diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-09 00:12:26 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-09 03:24:08 +0300 |
commit | 65fb622000af8e3dbb65480e1581758ecf4ba3e2 (patch) | |
tree | 7d83429d3762b1f0a44d04eb8fc780eedc0ec049 /test/functional/legacy/039_visual_block_mode_commands_spec.lua | |
parent | 9158cc171f46ebae0a0d3d1721aa5b7d829bcba5 (diff) | |
download | rneovim-65fb622000af8e3dbb65480e1581758ecf4ba3e2.tar.gz rneovim-65fb622000af8e3dbb65480e1581758ecf4ba3e2.tar.bz2 rneovim-65fb622000af8e3dbb65480e1581758ecf4ba3e2.zip |
functests: Replace execute with either command or feed_command
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:
1. msgpackparse() will show internal error: hash_add() in case of duplicate
keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
expected. Test was still functioning somehow though. Currently fixed.
Diffstat (limited to 'test/functional/legacy/039_visual_block_mode_commands_spec.lua')
-rw-r--r-- | test/functional/legacy/039_visual_block_mode_commands_spec.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/functional/legacy/039_visual_block_mode_commands_spec.lua b/test/functional/legacy/039_visual_block_mode_commands_spec.lua index 63335985cc..dffef50950 100644 --- a/test/functional/legacy/039_visual_block_mode_commands_spec.lua +++ b/test/functional/legacy/039_visual_block_mode_commands_spec.lua @@ -5,14 +5,14 @@ local helpers = require('test.functional.helpers')(after_each) local nvim, eq = helpers.meths, helpers.eq local insert, feed = helpers.insert, helpers.feed local clear, expect = helpers.clear, helpers.expect -local execute = helpers.execute +local feed_command = helpers.feed_command describe('Visual block mode', function() before_each(function() clear() - execute('set ts&vi sw&vi sts&vi noet') -- Vim compatible + feed_command('set ts&vi sw&vi sts&vi noet') -- Vim compatible end) it('should shift, insert, replace and change a block', function() @@ -55,9 +55,9 @@ describe('Visual block mode', function() cccc dddd]]) - execute('/^aa') + feed_command('/^aa') feed('l<C-v>jjjlllI<Right><Right> <ESC>') - execute('/xaaa$') + feed_command('/xaaa$') feed('<C-v>jjjI<lt>><Left>p<ESC>') expect([[ @@ -84,13 +84,13 @@ describe('Visual block mode', function() 4567]]) -- Test for Visual block was created with the last <C-v>$. - execute('/^A23$/') + feed_command('/^A23$/') feed('l<C-v>j$Aab<ESC>') -- Test for Visual block was created with the middle <C-v>$ (1). - execute('/^B23$/') + feed_command('/^B23$/') feed('l<C-v>j$hAab<ESC>') -- Test for Visual block was created with the middle <C-v>$ (2). - execute('/^C23$/') + feed_command('/^C23$/') feed('l<C-v>j$hhAab<ESC>') expect([[ @@ -112,8 +112,8 @@ describe('Visual block mode', function() ]]) -- Test for Visual block insert when virtualedit=all and utf-8 encoding. - execute('set ve=all') - execute('/\t\tline') + feed_command('set ve=all') + feed_command('/\t\tline') feed('07l<C-v>jjIx<ESC>') expect([[ @@ -199,10 +199,10 @@ describe('Visual block mode', function() 98765]]) -- Test cursor position. When virtualedit=block and Visual block mode and $gj. - execute('set ve=block') + feed_command('set ve=block') feed('G2l') feed('2k<C-v>$gj<ESC>') - execute([[let cpos=getpos("'>")]]) + feed_command([[let cpos=getpos("'>")]]) local cpos = nvim.get_var('cpos') local expected = { col = 4, @@ -223,7 +223,7 @@ describe('Visual block mode', function() #define BO_CRSR 0x0004]]) -- Block_insert when replacing spaces in front of the block with tabs. - execute('set ts=8 sts=4 sw=4') + feed_command('set ts=8 sts=4 sw=4') feed('ggf0<C-v>2jI<TAB><ESC>') expect([[ |