aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2015-11-23 13:58:35 +0100
committerMarco Hinz <mh.codebro@gmail.com>2015-11-23 13:58:35 +0100
commit369c1fdb259daf4f305ada8744e0564250480398 (patch)
treee61dc677cf85faa79a92814cbdadb63de7477635 /test/functional/ex_cmds
parent97cee2c2e39888b33a546ba5ffe37c510740c3a5 (diff)
parentd9fbc1865bf5237235e96ae8822326faa84ff9fc (diff)
downloadrneovim-369c1fdb259daf4f305ada8744e0564250480398.tar.gz
rneovim-369c1fdb259daf4f305ada8744e0564250480398.tar.bz2
rneovim-369c1fdb259daf4f305ada8744e0564250480398.zip
Merge PR #3687 'Add luacheck for linting tests'
Diffstat (limited to 'test/functional/ex_cmds')
-rw-r--r--test/functional/ex_cmds/grep_spec.lua5
-rw-r--r--test/functional/ex_cmds/oldfiles_spec.lua7
-rw-r--r--test/functional/ex_cmds/profile_spec.lua2
-rw-r--r--test/functional/ex_cmds/quit_spec.lua2
-rw-r--r--test/functional/ex_cmds/recover_spec.lua1
-rw-r--r--test/functional/ex_cmds/sign_spec.lua4
-rw-r--r--test/functional/ex_cmds/wviminfo_spec.lua6
7 files changed, 11 insertions, 16 deletions
diff --git a/test/functional/ex_cmds/grep_spec.lua b/test/functional/ex_cmds/grep_spec.lua
index 9c792099c1..f3ff0a3817 100644
--- a/test/functional/ex_cmds/grep_spec.lua
+++ b/test/functional/ex_cmds/grep_spec.lua
@@ -1,7 +1,6 @@
local helpers = require('test.functional.helpers')
-local clear, execute, nvim, feed, eq, ok, eval =
- helpers.clear, helpers.execute, helpers.nvim, helpers.feed,
- helpers.eq, helpers.ok, helpers.eval
+local clear, execute, feed, ok, eval =
+ helpers.clear, helpers.execute, helpers.feed, helpers.ok, helpers.eval
describe(':grep', function()
before_each(clear)
diff --git a/test/functional/ex_cmds/oldfiles_spec.lua b/test/functional/ex_cmds/oldfiles_spec.lua
index e02f42cd12..dac6757a97 100644
--- a/test/functional/ex_cmds/oldfiles_spec.lua
+++ b/test/functional/ex_cmds/oldfiles_spec.lua
@@ -2,7 +2,7 @@ local Screen = require('test.functional.ui.screen')
local helpers = require('test.functional.helpers')
local buf, eq, execute = helpers.curbufmeths, helpers.eq, helpers.execute
-local feed, nvim, nvim_prog = helpers.feed, helpers.nvim, helpers.nvim_prog
+local feed, nvim_prog = helpers.feed, helpers.nvim_prog
local ok, set_session, spawn = helpers.ok, helpers.set_session, helpers.spawn
local shada_file = 'test.shada'
@@ -11,9 +11,6 @@ local shada_file = 'test.shada'
-- helpers.clear() uses "-i NONE", which is not useful for this test.
--
local function _clear()
- if session then
- session:exit(0)
- end
set_session(spawn({nvim_prog,
'-u', 'NONE',
'--cmd', 'set noswapfile undodir=. directory=. viewdir=. backupdir=.',
@@ -32,7 +29,7 @@ describe(':oldfiles', function()
end
it('shows most recently used files', function()
- screen = Screen.new(100, 5)
+ local screen = Screen.new(100, 5)
screen:attach()
execute('edit testfile1')
execute('edit testfile2')
diff --git a/test/functional/ex_cmds/profile_spec.lua b/test/functional/ex_cmds/profile_spec.lua
index 721669e73b..744b22621f 100644
--- a/test/functional/ex_cmds/profile_spec.lua
+++ b/test/functional/ex_cmds/profile_spec.lua
@@ -1,5 +1,5 @@
require('os')
-require('lfs')
+local lfs = require('lfs')
local helpers = require('test.functional.helpers')
local eval = helpers.eval
diff --git a/test/functional/ex_cmds/quit_spec.lua b/test/functional/ex_cmds/quit_spec.lua
index 3cd8e19617..a8156228d3 100644
--- a/test/functional/ex_cmds/quit_spec.lua
+++ b/test/functional/ex_cmds/quit_spec.lua
@@ -1,5 +1,5 @@
local helpers = require('test.functional.helpers')
-local execute, eq, clear = helpers.execute, helpers.eq, helpers.clear
+local clear = helpers.clear
describe(':qa', function()
before_each(function()
diff --git a/test/functional/ex_cmds/recover_spec.lua b/test/functional/ex_cmds/recover_spec.lua
index 6749cfaf40..e1d01f6896 100644
--- a/test/functional/ex_cmds/recover_spec.lua
+++ b/test/functional/ex_cmds/recover_spec.lua
@@ -1,6 +1,7 @@
-- Tests for :recover
local helpers = require('test.functional.helpers')
+local lfs = require('lfs')
local execute, eq, clear, eval, feed, expect, source =
helpers.execute, helpers.eq, helpers.clear, helpers.eval, helpers.feed,
helpers.expect, helpers.source
diff --git a/test/functional/ex_cmds/sign_spec.lua b/test/functional/ex_cmds/sign_spec.lua
index be213cd0d9..c50704504d 100644
--- a/test/functional/ex_cmds/sign_spec.lua
+++ b/test/functional/ex_cmds/sign_spec.lua
@@ -1,7 +1,5 @@
local helpers = require('test.functional.helpers')
-local clear, nvim, buffer, curbuf, curwin, eq, ok =
- helpers.clear, helpers.nvim, helpers.buffer, helpers.curbuf, helpers.curwin,
- helpers.eq, helpers.ok
+local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq
describe('sign', function()
before_each(clear)
diff --git a/test/functional/ex_cmds/wviminfo_spec.lua b/test/functional/ex_cmds/wviminfo_spec.lua
index b6b9185cf2..207d94124f 100644
--- a/test/functional/ex_cmds/wviminfo_spec.lua
+++ b/test/functional/ex_cmds/wviminfo_spec.lua
@@ -1,6 +1,6 @@
local helpers, lfs = require('test.functional.helpers'), require('lfs')
-local clear, execute, eq, neq, spawn, nvim_prog, set_session, wait, write_file
- = helpers.clear, helpers.execute, helpers.eq, helpers.neq, helpers.spawn,
+local execute, eq, neq, spawn, nvim_prog, set_session, wait, write_file
+ = helpers.execute, helpers.eq, helpers.neq, helpers.spawn,
helpers.nvim_prog, helpers.set_session, helpers.wait, helpers.write_file
describe(':wshada', function()
@@ -13,7 +13,7 @@ describe(':wshada', function()
end
-- Override the default session because we need 'swapfile' for these tests.
- local session = spawn({nvim_prog, '-u', 'NONE', '-i', '/dev/null', '--embed',
+ session = spawn({nvim_prog, '-u', 'NONE', '-i', '/dev/null', '--embed',
'--cmd', 'set swapfile'})
set_session(session)