diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
commit | c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57 (patch) | |
tree | b7e59c416d1435725c65f8952b6e55c70544d97e /test/functional/legacy/008_autocommands_spec.lua | |
parent | 62108c3b0be46936c83f6d4c98b44ceb5e6f77fd (diff) | |
parent | 27a577586eace687c47e7398845178208cae524a (diff) | |
download | rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.gz rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.bz2 rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.zip |
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'test/functional/legacy/008_autocommands_spec.lua')
-rw-r--r-- | test/functional/legacy/008_autocommands_spec.lua | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/functional/legacy/008_autocommands_spec.lua b/test/functional/legacy/008_autocommands_spec.lua index 2c398d3c73..7474f1e068 100644 --- a/test/functional/legacy/008_autocommands_spec.lua +++ b/test/functional/legacy/008_autocommands_spec.lua @@ -3,7 +3,7 @@ local helpers = require('test.functional.helpers')(after_each) local feed, source = helpers.feed, helpers.source -local clear, execute, expect, eq, eval = helpers.clear, helpers.execute, helpers.expect, helpers.eq, helpers.eval +local clear, feed_command, expect, eq, eval = helpers.clear, helpers.feed_command, helpers.expect, helpers.eq, helpers.eval local write_file, wait, dedent = helpers.write_file, helpers.wait, helpers.dedent local io = require('io') @@ -25,15 +25,15 @@ describe('autocommands that delete and unload buffers:', function() before_each(clear) it('BufWritePre, BufUnload', function() - execute('au BufWritePre Xxx1 bunload') - execute('au BufWritePre Xxx2 bwipe') - execute('e Xxx2') + feed_command('au BufWritePre Xxx1 bunload') + feed_command('au BufWritePre Xxx2 bwipe') + feed_command('e Xxx2') eq('Xxx2', eval('bufname("%")')) - execute('e Xxx1') + feed_command('e Xxx1') eq('Xxx1', eval('bufname("%")')) -- The legacy test file did not check the error message. - execute('let v:errmsg = "no error"') - execute('write') + feed_command('let v:errmsg = "no error"') + feed_command('write') -- Discard all "hit enter" prompts and messages. feed('<C-L>') eq('E203: Autocommands deleted or unloaded buffer to be written', @@ -41,11 +41,11 @@ describe('autocommands that delete and unload buffers:', function() eq('Xxx2', eval('bufname("%")')) expect(text2) -- Start editing Xxx2. - execute('e! Xxx2') + feed_command('e! Xxx2') -- The legacy test file did not check the error message. - execute('let v:errmsg = "no error"') + feed_command('let v:errmsg = "no error"') -- Write Xxx2, will delete the buffer and give an error msg. - execute('w') + feed_command('w') -- Discard all "hit enter" prompts and messages. feed('<C-L>') eq('E203: Autocommands deleted or unloaded buffer to be written', @@ -73,17 +73,17 @@ describe('autocommands that delete and unload buffers:', function() au BufUnload * call CloseAll() au VimLeave * call WriteToOut() ]]) - execute('e Xxx2') + feed_command('e Xxx2') -- Discard all "hit enter" prompts and messages. feed('<C-L>') - execute('e Xxx1') + feed_command('e Xxx1') -- Discard all "hit enter" prompts and messages. feed('<C-L>') - execute('e Makefile') -- an existing file + feed_command('e Makefile') -- an existing file feed('<C-L>') - execute('sp new2') + feed_command('sp new2') feed('<C-L>') - execute('q') + feed_command('q') wait() eq('VimLeave done', string.match(io.open('test.out', 'r'):read('*all'), "^%s*(.-)%s*$")) |