diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-10 22:21:06 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-10 22:21:06 +0300 |
commit | ab4d13e2fa09db538756cc5cfb36f81681e5ff7a (patch) | |
tree | b8bded415655f09bc323a23d21ed8d7e74b1c8da /test/functional/terminal/buffer_spec.lua | |
parent | a40a969e9a4776f1e274dcf0e59c8f1ec1770ca0 (diff) | |
parent | 9aface8c4d1edd25d4fed3e099e3c2c02b0a282a (diff) | |
download | rneovim-ab4d13e2fa09db538756cc5cfb36f81681e5ff7a.tar.gz rneovim-ab4d13e2fa09db538756cc5cfb36f81681e5ff7a.tar.bz2 rneovim-ab4d13e2fa09db538756cc5cfb36f81681e5ff7a.zip |
Merge branch 'master' into luaviml'/lua
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 129390a7a5..48b8512bf0 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim local wait = helpers.wait -local eval, execute, source = helpers.eval, helpers.execute, helpers.source +local eval, feed_command, source = helpers.eval, helpers.feed_command, helpers.source local eq, neq = helpers.eq, helpers.neq local write_file = helpers.write_file @@ -13,7 +13,7 @@ describe('terminal buffer', function() before_each(function() clear() - execute('set modifiable swapfile undolevels=20') + feed_command('set modifiable swapfile undolevels=20') wait() screen = thelpers.screen_setup() end) @@ -86,7 +86,7 @@ describe('terminal buffer', function() it('sends data to the terminal when the "put" operator is used', function() feed('<c-\\><c-n>gg"ayj') - execute('let @a = "appended " . @a') + feed_command('let @a = "appended " . @a') feed('"ap"ap') screen:expect([[ ^tty ready | @@ -112,8 +112,8 @@ describe('terminal buffer', function() it('sends data to the terminal when the ":put" command is used', function() feed('<c-\\><c-n>gg"ayj') - execute('let @a = "appended " . @a') - execute('put a') + feed_command('let @a = "appended " . @a') + feed_command('put a') screen:expect([[ ^tty ready | appended tty ready | @@ -124,7 +124,7 @@ describe('terminal buffer', function() :put a | ]]) -- line argument is only used to move the cursor - execute('6put a') + feed_command('6put a') screen:expect([[ tty ready | appended tty ready | @@ -147,7 +147,7 @@ describe('terminal buffer', function() {4:~ }| :bd! | ]]) - execute('bnext') + feed_command('bnext') screen:expect([[ ^ | {4:~ }| @@ -162,7 +162,7 @@ describe('terminal buffer', function() it('handles loss of focus gracefully', function() -- Change the statusline to avoid printing the file name, which varies. nvim('set_option', 'statusline', '==========') - execute('set laststatus=0') + feed_command('set laststatus=0') -- Save the buffer number of the terminal for later testing. local tbuf = eval('bufnr("%")') @@ -191,16 +191,16 @@ describe('terminal buffer', function() ]]) neq(tbuf, eval('bufnr("%")')) - execute('quit!') -- Should exit the new window, not the terminal. + feed_command('quit!') -- Should exit the new window, not the terminal. eq(tbuf, eval('bufnr("%")')) - execute('set laststatus=1') -- Restore laststatus to the default. + feed_command('set laststatus=1') -- Restore laststatus to the default. end) it('term_close() use-after-free #4393', function() - execute('terminal yes') + feed_command('terminal yes') feed([[<C-\><C-n>]]) - execute('bdelete!') + feed_command('bdelete!') end) end) @@ -217,12 +217,12 @@ describe('No heap-buffer-overflow when using', function() end) it('termopen(echo) #3161', function() - execute('edit ' .. testfilename) + feed_command('edit ' .. testfilename) -- Move cursor away from the beginning of the line feed('$') -- Let termopen() modify the buffer - execute('call termopen("echo")') + feed_command('call termopen("echo")') wait() - execute('bdelete!') + feed_command('bdelete!') end) end) |