diff options
| author | Marco Hinz <mh.codebro@gmail.com> | 2015-11-17 23:31:22 +0100 |
|---|---|---|
| committer | Marco Hinz <mh.codebro@gmail.com> | 2015-11-23 13:57:21 +0100 |
| commit | d9fbc1865bf5237235e96ae8822326faa84ff9fc (patch) | |
| tree | e61dc677cf85faa79a92814cbdadb63de7477635 /test/functional/autocmd | |
| parent | 4a69e55f390fcbd5e3d6c88c882c0b921c9b6f87 (diff) | |
| download | rneovim-d9fbc1865bf5237235e96ae8822326faa84ff9fc.tar.gz rneovim-d9fbc1865bf5237235e96ae8822326faa84ff9fc.tar.bz2 rneovim-d9fbc1865bf5237235e96ae8822326faa84ff9fc.zip | |
test/functional: clean up according to luacheck (part 2)
Diffstat (limited to 'test/functional/autocmd')
| -rw-r--r-- | test/functional/autocmd/tabclose_spec.lua | 5 | ||||
| -rw-r--r-- | test/functional/autocmd/tabnew_spec.lua | 6 | ||||
| -rw-r--r-- | test/functional/autocmd/tabnewentered_spec.lua | 6 | ||||
| -rw-r--r-- | test/functional/autocmd/termclose_spec.lua | 4 |
4 files changed, 7 insertions, 14 deletions
diff --git a/test/functional/autocmd/tabclose_spec.lua b/test/functional/autocmd/tabclose_spec.lua index 847362e3de..bf609d1846 100644 --- a/test/functional/autocmd/tabclose_spec.lua +++ b/test/functional/autocmd/tabclose_spec.lua @@ -1,7 +1,5 @@ local helpers = require('test.functional.helpers') -local clear, nvim, buffer, curbuf, curwin, eq, neq, ok = - helpers.clear, helpers.nvim, helpers.buffer, helpers.curbuf, helpers.curwin, - helpers.eq, helpers.neq, helpers.ok +local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq describe('TabClosed', function() describe('au TabClosed', function() @@ -20,7 +18,6 @@ describe('TabClosed', function() end) describe('with NR as <afile>', function() it('matches when closing a tab whose index is NR', function() - tmp_path = nvim('eval', 'tempname()') nvim('command', 'au! TabClosed 2 echom "tabclosed:match"') repeat nvim('command', 'tabnew') diff --git a/test/functional/autocmd/tabnew_spec.lua b/test/functional/autocmd/tabnew_spec.lua index d80644cd92..5ab504889b 100644 --- a/test/functional/autocmd/tabnew_spec.lua +++ b/test/functional/autocmd/tabnew_spec.lua @@ -1,7 +1,5 @@ local helpers = require('test.functional.helpers') -local clear, nvim, buffer, curbuf, curwin, eq, neq, ok = - helpers.clear, helpers.nvim, helpers.buffer, helpers.curbuf, helpers.curwin, - helpers.eq, helpers.neq, helpers.ok +local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq describe('TabNew', function() setup(clear) @@ -15,7 +13,7 @@ describe('TabNew', function() end) describe('with FILE as <afile>', function() it('matches when opening a new tab for FILE', function() - tmp_path = nvim('eval', 'tempname()') + local tmp_path = nvim('eval', 'tempname()') nvim('command', 'au! TabNew '..tmp_path..' echom "tabnew:match"') eq("\ntabnew:4:3\ntabnew:match\n\""..tmp_path.."\" [New File]", nvim('command_output', 'tabnew '..tmp_path)) end) diff --git a/test/functional/autocmd/tabnewentered_spec.lua b/test/functional/autocmd/tabnewentered_spec.lua index f220c15ef7..64b9a22f41 100644 --- a/test/functional/autocmd/tabnewentered_spec.lua +++ b/test/functional/autocmd/tabnewentered_spec.lua @@ -1,7 +1,5 @@ local helpers = require('test.functional.helpers') -local clear, nvim, buffer, curbuf, curwin, eq, neq, ok = - helpers.clear, helpers.nvim, helpers.buffer, helpers.curbuf, helpers.curwin, - helpers.eq, helpers.neq, helpers.ok +local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq describe('TabNewEntered', function() describe('au TabNewEntered', function() @@ -15,7 +13,7 @@ describe('TabNewEntered', function() end) describe('with FILE as <afile>', function() it('matches when opening a new tab for FILE', function() - tmp_path = nvim('eval', 'tempname()') + local tmp_path = nvim('eval', 'tempname()') nvim('command', 'au! TabNewEntered '..tmp_path..' echom "tabnewentered:match"') eq("\n\""..tmp_path.."\" [New File]\ntabnewentered:4:4\ntabnewentered:match", nvim('command_output', 'tabnew '..tmp_path)) end) diff --git a/test/functional/autocmd/termclose_spec.lua b/test/functional/autocmd/termclose_spec.lua index 265d857a42..0961340e61 100644 --- a/test/functional/autocmd/termclose_spec.lua +++ b/test/functional/autocmd/termclose_spec.lua @@ -1,11 +1,11 @@ local helpers = require('test.functional.helpers') local Screen = require('test.functional.ui.screen') -local clear, eval, execute, feed, nvim, nvim_dir = helpers.clear, helpers.eval, +local clear, execute, feed, nvim, nvim_dir = helpers.clear, helpers.execute, helpers.feed, helpers.nvim, helpers.nvim_dir -local wait = helpers.wait describe('TermClose event', function() + local screen before_each(function() clear() nvim('set_option', 'shell', nvim_dir .. '/shell-test') |