aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/004_bufenter_with_modelines_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/004_bufenter_with_modelines_spec.lua')
-rw-r--r--test/functional/legacy/004_bufenter_with_modelines_spec.lua21
1 files changed, 10 insertions, 11 deletions
diff --git a/test/functional/legacy/004_bufenter_with_modelines_spec.lua b/test/functional/legacy/004_bufenter_with_modelines_spec.lua
index 3e5cdd2ff2..9b0df024c8 100644
--- a/test/functional/legacy/004_bufenter_with_modelines_spec.lua
+++ b/test/functional/legacy/004_bufenter_with_modelines_spec.lua
@@ -1,10 +1,9 @@
--- vim: set foldmethod=marker foldmarker=[[,]] :
-- Test for autocommand that changes current buffer on BufEnter event.
-- Check if modelines are interpreted for the correct buffer.
local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
-local execute, expect = helpers.execute, helpers.expect
+local feed_command, expect = helpers.feed_command, helpers.expect
describe('BufEnter with modelines', function()
setup(clear)
@@ -20,34 +19,34 @@ describe('BufEnter with modelines', function()
this is a test
end of test file Xxx]])
- execute('au BufEnter Xxx brew')
+ feed_command('au BufEnter Xxx brew')
-- Write test file Xxx
- execute('/start of')
- execute('.,/end of/w! Xxx')
- execute('set ai modeline modelines=3')
+ feed_command('/start of')
+ feed_command('.,/end of/w! Xxx')
+ feed_command('set ai modeline modelines=3')
-- Split to Xxx, autocmd will do :brew
- execute('sp Xxx')
+ feed_command('sp Xxx')
-- Append text with autoindent to this file
feed('G?this is a<CR>')
feed('othis should be auto-indented<Esc>')
-- Go to Xxx, no autocmd anymore
- execute('au! BufEnter Xxx')
- execute('buf Xxx')
+ feed_command('au! BufEnter Xxx')
+ feed_command('buf Xxx')
-- Append text without autoindent to Xxx
feed('G?this is a<CR>')
feed('othis should be in column 1<Esc>')
- execute('wq')
+ feed_command('wq')
-- Include Xxx in the current file
feed('G:r Xxx<CR>')
-- Vim issue #57 do not move cursor on <c-o> when autoindent is set
- execute('set fo+=r')
+ feed_command('set fo+=r')
feed('G')
feed('o# abcdef<Esc>2hi<CR><c-o>d0<Esc>')
feed('o# abcdef<Esc>2hi<c-o>d0<Esc>')