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/fixeol_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/fixeol_spec.lua')
-rw-r--r-- | test/functional/legacy/fixeol_spec.lua | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/functional/legacy/fixeol_spec.lua b/test/functional/legacy/fixeol_spec.lua index 1e9e832536..801451b300 100644 --- a/test/functional/legacy/fixeol_spec.lua +++ b/test/functional/legacy/fixeol_spec.lua @@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local feed = helpers.feed -local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect +local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect if helpers.pending_win32(pending) then return end @@ -25,38 +25,38 @@ describe('fixeol', function() it('is working', function() -- First write two test files – with and without trailing EOL. -- Use Unix fileformat for consistency. - execute('set ff=unix') - execute('enew!') + feed_command('set ff=unix') + feed_command('enew!') feed('awith eol<esc>:w! XXEol<cr>') - execute('enew!') - execute('set noeol nofixeol') + feed_command('enew!') + feed_command('set noeol nofixeol') feed('awithout eol<esc>:w! XXNoEol<cr>') - execute('set eol fixeol') - execute('bwipe XXEol XXNoEol') + feed_command('set eol fixeol') + feed_command('bwipe XXEol XXNoEol') -- Try editing files with 'fixeol' disabled. - execute('e! XXEol') + feed_command('e! XXEol') feed('ostays eol<esc>:set nofixeol<cr>') - execute('w! XXTestEol') - execute('e! XXNoEol') + feed_command('w! XXTestEol') + feed_command('e! XXNoEol') feed('ostays without<esc>:set nofixeol<cr>') - execute('w! XXTestNoEol') - execute('bwipe XXEol XXNoEol XXTestEol XXTestNoEol') - execute('set fixeol') + feed_command('w! XXTestNoEol') + feed_command('bwipe XXEol XXNoEol XXTestEol XXTestNoEol') + feed_command('set fixeol') -- Append "END" to each file so that we can see what the last written char was. feed('ggdGaEND<esc>:w >>XXEol<cr>') - execute('w >>XXNoEol') - execute('w >>XXTestEol') - execute('w >>XXTestNoEol') + feed_command('w >>XXNoEol') + feed_command('w >>XXTestEol') + feed_command('w >>XXTestNoEol') -- Concatenate the results. - execute('e! test.out') + feed_command('e! test.out') feed('a0<esc>:$r XXEol<cr>') - execute('$r XXNoEol') + feed_command('$r XXNoEol') feed('Go1<esc>:$r XXTestEol<cr>') - execute('$r XXTestNoEol') - execute('w') + feed_command('$r XXTestNoEol') + feed_command('w') -- Assert buffer contents. expect([=[ |