mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
test/functional: clean up according to luacheck (part 1)
This commit is contained in:
@@ -2,7 +2,4 @@
|
|||||||
|
|
||||||
std = '+luajit +busted'
|
std = '+luajit +busted'
|
||||||
cache = true
|
cache = true
|
||||||
exclude_files = {
|
exclude_files = { '*/preload.lua' }
|
||||||
'benchmark/preload.lua',
|
|
||||||
'unit/preload.lua'
|
|
||||||
}
|
|
||||||
|
@@ -4,8 +4,7 @@
|
|||||||
-- pointer blocks.
|
-- pointer blocks.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local clear, expect, source = helpers.clear, helpers.expect, helpers.source
|
||||||
local clear, execute, expect, source = helpers.clear, helpers.execute, helpers.expect, helpers.source
|
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
|
|
||||||
describe('78', function()
|
describe('78', function()
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
-- Test for *:s%* on :substitute.
|
-- Test for *:s%* on :substitute.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local feed, insert = helpers.feed, helpers.insert
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
local eq, eval = helpers.eq, helpers.eval
|
local eq, eval = helpers.eq, helpers.eval
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
-- Also test "g~ap".
|
-- Also test "g~ap".
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local feed, source = helpers.feed, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('case-insensitive string comparison in UTF-8', function()
|
describe('case-insensitive string comparison in UTF-8', function()
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Tests for curswant not changing when setting an option.
|
-- Tests for curswant not changing when setting an option.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local insert, source = helpers.insert, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('curswant', function()
|
describe('curswant', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed = helpers.feed
|
local feed = helpers.feed
|
||||||
local clear, execute, expect, source = helpers.clear, helpers.execute, helpers.expect, helpers.source
|
local clear, expect, source = helpers.clear, helpers.expect, helpers.source
|
||||||
|
|
||||||
describe("setting 'number' and 'relativenumber'", function()
|
describe("setting 'number' and 'relativenumber'", function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Tests for sha256() function.
|
-- Tests for sha256() function.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local insert, source = helpers.insert, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('sha256()', function()
|
describe('sha256()', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Tests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar().
|
-- Tests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar().
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local insert, source = helpers.insert, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('context variables', function()
|
describe('context variables', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
-- Same as legacy test 93 but using UTF-8 file encoding.
|
-- Same as legacy test 93 but using UTF-8 file encoding.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local feed, insert = helpers.feed, helpers.insert
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('store cursor position in session file in UTF-8', function()
|
describe('store cursor position in session file in UTF-8', function()
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
-- Same as legacy test 92 but using Latin-1 file encoding.
|
-- Same as legacy test 92 but using Latin-1 file encoding.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local feed, insert = helpers.feed, helpers.insert
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('store cursor position in session file in Latin-1', function()
|
describe('store cursor position in session file in Latin-1', function()
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
-- actually tried.
|
-- actually tried.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local insert, source = helpers.insert, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('regex with multi-byte', function()
|
describe('regex with multi-byte', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
-- it belongs to.
|
-- it belongs to.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local source = helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('location list', function()
|
describe('location list', function()
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
-- characters.
|
-- characters.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
local clear = helpers.clear
|
||||||
local execute, expect = helpers.execute, helpers.expect
|
local execute, expect = helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('glob() and globpath()', function()
|
describe('glob() and globpath()', function()
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Test for 'scrollbind' causing an unexpected scroll of one of the windows.
|
-- Test for 'scrollbind' causing an unexpected scroll of one of the windows.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local source = helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('scrollbind', function()
|
describe('scrollbind', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Tests for 'undolevel' setting being global-local
|
-- Tests for 'undolevel' setting being global-local
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local source = helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('undolevel', function()
|
describe('undolevel', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
-- Test for v:hlsearch
|
-- Test for v:hlsearch
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
local clear, feed = helpers.clear, helpers.feed
|
||||||
local execute, expect = helpers.execute, helpers.expect
|
local execute, expect = helpers.execute, helpers.expect
|
||||||
local eval = helpers.eval
|
|
||||||
|
|
||||||
describe('v:hlsearch', function()
|
describe('v:hlsearch', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
-- Test if fnameescape is correct for special chars like!
|
-- Test if fnameescape is correct for special chars like!
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
local clear = helpers.clear
|
||||||
local execute, expect = helpers.execute, helpers.expect
|
local execute, expect = helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('fnameescape', function()
|
describe('fnameescape', function()
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Test for visual mode not being reset causing E315 error.
|
-- Test for visual mode not being reset causing E315 error.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local feed, source = helpers.feed, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('E315 error', function()
|
describe('E315 error', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
-- Test filename modifiers.
|
-- Test filename modifiers.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
local clear = helpers.clear
|
||||||
local execute, expect = helpers.execute, helpers.expect
|
local execute, expect = helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('filename modifiers', function()
|
describe('filename modifiers', function()
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
-- Tests for errorformat.
|
-- Tests for errorformat.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
local clear = helpers.clear
|
||||||
local execute, expect = helpers.execute, helpers.expect
|
local execute, expect = helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('errorformat', function()
|
describe('errorformat', function()
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local insert = helpers.insert
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute = helpers.clear, helpers.execute
|
||||||
|
|
||||||
describe('107', function()
|
describe('107', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Test for linebreak and list option in utf-8 mode
|
-- Test for linebreak and list option in utf-8 mode
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local source = helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('linebreak', function()
|
describe('linebreak', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
-- Tests for nested function.
|
-- Tests for nested function.
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
local clear, insert = helpers.clear, helpers.insert
|
||||||
local execute, expect, source = helpers.execute, helpers.expect, helpers.source
|
local execute, expect, source = helpers.execute, helpers.expect, helpers.source
|
||||||
|
|
||||||
describe('test_nested_function', function()
|
describe('test_nested_function', function()
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
-- Tests for quickfix window's title
|
-- Tests for quickfix window's title
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local insert, source = helpers.insert, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, expect = helpers.clear, helpers.expect
|
||||||
|
|
||||||
describe('qf_title', function()
|
describe('qf_title', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
-- Tests for signs
|
-- Tests for signs
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('signs', function()
|
describe('signs', function()
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
-- Tests for writefile()
|
-- Tests for writefile()
|
||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
describe('writefile', function()
|
describe('writefile', function()
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local execute, eq, clear, eval, feed, ok =
|
local eq, clear, eval, feed =
|
||||||
helpers.execute, helpers.eq, helpers.clear, helpers.eval,
|
helpers.eq, helpers.clear, helpers.eval, helpers.feed
|
||||||
helpers.feed, helpers.ok
|
|
||||||
|
|
||||||
describe('K', function()
|
describe('K', function()
|
||||||
local test_file = 'K_spec_out'
|
local test_file = 'K_spec_out'
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local eval, command, nvim = helpers.eval, helpers.command, helpers.nvim
|
local eval, command, nvim = helpers.eval, helpers.command, helpers.nvim
|
||||||
local eq, run, stop = helpers.eq, helpers.run, helpers.stop
|
local eq, run, stop = helpers.eq, helpers.run, helpers.stop
|
||||||
local clear, feed = helpers.clear, helpers.feed
|
local clear = helpers.clear
|
||||||
|
|
||||||
|
|
||||||
local function get_prefix(sync)
|
local function get_prefix(sync)
|
||||||
@@ -12,8 +12,8 @@ local function get_prefix(sync)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function call(fn, args)
|
local function call(fn, arguments)
|
||||||
command('call '..fn..'('..args..')')
|
command('call '..fn..'('..arguments..')')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -87,9 +87,9 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('RpcCommand arg1 arg2 arg3')
|
command('RpcCommand arg1 arg2 arg3')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({'arg1', 'arg2', 'arg3'}, args[1])
|
eq({'arg1', 'arg2', 'arg3'}, arguments[1])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -104,9 +104,9 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('1,1RpcCommand')
|
command('1,1RpcCommand')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({1, 1}, args[1])
|
eq({1, 1}, arguments[1])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -121,10 +121,10 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('1,1RpcCommand arg')
|
command('1,1RpcCommand arg')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({'arg'}, args[1])
|
eq({'arg'}, arguments[1])
|
||||||
eq({1, 1}, args[2])
|
eq({1, 1}, arguments[2])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -139,10 +139,10 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('5RpcCommand arg')
|
command('5RpcCommand arg')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({'arg'}, args[1])
|
eq({'arg'}, arguments[1])
|
||||||
eq(5, args[2])
|
eq(5, arguments[2])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -157,11 +157,11 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('5RpcCommand! arg')
|
command('5RpcCommand! arg')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({'arg'}, args[1])
|
eq({'arg'}, arguments[1])
|
||||||
eq(5, args[2])
|
eq(5, arguments[2])
|
||||||
eq(1, args[3])
|
eq(1, arguments[3])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -177,12 +177,12 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('5RpcCommand! b arg')
|
command('5RpcCommand! b arg')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({'arg'}, args[1])
|
eq({'arg'}, arguments[1])
|
||||||
eq(5, args[2])
|
eq(5, arguments[2])
|
||||||
eq(1, args[3])
|
eq(1, arguments[3])
|
||||||
eq('b', args[4])
|
eq('b', arguments[4])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -199,13 +199,13 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('5RpcCommand! b arg')
|
command('5RpcCommand! b arg')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({'arg'}, args[1])
|
eq({'arg'}, arguments[1])
|
||||||
eq(5, args[2])
|
eq(5, arguments[2])
|
||||||
eq(1, args[3])
|
eq(1, arguments[3])
|
||||||
eq('b', args[4])
|
eq('b', arguments[4])
|
||||||
eq('regb', args[5])
|
eq('regb', arguments[5])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ local function autocmd_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('doautocmd BufEnter x.c')
|
command('doautocmd BufEnter x.c')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
@@ -259,9 +259,9 @@ local function autocmd_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
command('doautocmd BufEnter x.c')
|
command('doautocmd BufEnter x.c')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq('x.c', args[1])
|
eq('x.c', arguments[1])
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -303,9 +303,9 @@ local function function_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({{1, 'a', {'b', 'c'}}}, args)
|
eq({{1, 'a', {'b', 'c'}}}, arguments)
|
||||||
return 'rv'
|
return 'rv'
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -324,9 +324,9 @@ local function function_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, args)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({{1, 'a', {'b', 'c'}}, 4}, args)
|
eq({{1, 'a', {'b', 'c'}}, 4}, arguments)
|
||||||
return 'rv'
|
return 'rv'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local nvim, eq, neq, ok, eval
|
local nvim, eq, neq, eval = helpers.nvim, helpers.eq, helpers.neq, helpers.eval
|
||||||
= helpers.nvim, helpers.eq, helpers.neq, helpers.ok, helpers.eval
|
|
||||||
local clear = helpers.clear
|
local clear = helpers.clear
|
||||||
|
|
||||||
describe('serverstart(), serverstop()', function()
|
describe('serverstart(), serverstop()', function()
|
||||||
|
@@ -9,8 +9,8 @@ local reset, set_additional_cmd, clear =
|
|||||||
shada_helpers.clear
|
shada_helpers.clear
|
||||||
|
|
||||||
describe('ShaDa support code', function()
|
describe('ShaDa support code', function()
|
||||||
testfilename = 'Xtestfile-functional-shada-buffers'
|
local testfilename = 'Xtestfile-functional-shada-buffers'
|
||||||
testfilename_2 = 'Xtestfile-functional-shada-buffers-2'
|
local testfilename_2 = 'Xtestfile-functional-shada-buffers-2'
|
||||||
before_each(reset)
|
before_each(reset)
|
||||||
after_each(clear)
|
after_each(clear)
|
||||||
|
|
||||||
|
@@ -4,9 +4,8 @@ local nvim_command, funcs, eq = helpers.command, helpers.funcs, helpers.eq
|
|||||||
local exc_exec = helpers.exc_exec
|
local exc_exec = helpers.exc_exec
|
||||||
|
|
||||||
local shada_helpers = require('test.functional.shada.helpers')
|
local shada_helpers = require('test.functional.shada.helpers')
|
||||||
local reset, set_additional_cmd, clear, get_shada_rw =
|
local reset, clear, get_shada_rw = shada_helpers.reset, shada_helpers.clear,
|
||||||
shada_helpers.reset, shada_helpers.set_additional_cmd,
|
shada_helpers.get_shada_rw
|
||||||
shada_helpers.clear, shada_helpers.get_shada_rw
|
|
||||||
local read_shada_file = shada_helpers.read_shada_file
|
local read_shada_file = shada_helpers.read_shada_file
|
||||||
|
|
||||||
local wshada, sdrcmd, shada_fname = get_shada_rw('Xtest-functional-shada-compatibility.shada')
|
local wshada, sdrcmd, shada_fname = get_shada_rw('Xtest-functional-shada-compatibility.shada')
|
||||||
@@ -181,7 +180,7 @@ describe('ShaDa forward compatibility support code', function()
|
|||||||
end
|
end
|
||||||
eq(3, found)
|
eq(3, found)
|
||||||
nvim_command('wshada! ' .. shada_fname)
|
nvim_command('wshada! ' .. shada_fname)
|
||||||
local found = 0
|
found = 0
|
||||||
for i, subv in ipairs(read_shada_file(shada_fname)) do
|
for i, subv in ipairs(read_shada_file(shada_fname)) do
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
eq(1, subv.type)
|
eq(1, subv.type)
|
||||||
@@ -249,7 +248,7 @@ describe('ShaDa forward compatibility support code', function()
|
|||||||
end
|
end
|
||||||
eq(1, found)
|
eq(1, found)
|
||||||
nvim_command('wshada! ' .. shada_fname)
|
nvim_command('wshada! ' .. shada_fname)
|
||||||
local found = 0
|
found = 0
|
||||||
for i, v in ipairs(read_shada_file(shada_fname)) do
|
for i, v in ipairs(read_shada_file(shada_fname)) do
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
eq(1, v.type)
|
eq(1, v.type)
|
||||||
@@ -289,7 +288,7 @@ describe('ShaDa forward compatibility support code', function()
|
|||||||
end
|
end
|
||||||
eq(1, found)
|
eq(1, found)
|
||||||
nvim_command('wshada! ' .. shada_fname)
|
nvim_command('wshada! ' .. shada_fname)
|
||||||
local found = 0
|
found = 0
|
||||||
for i, v in ipairs(read_shada_file(shada_fname)) do
|
for i, v in ipairs(read_shada_file(shada_fname)) do
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
eq(1, v.type)
|
eq(1, v.type)
|
||||||
@@ -395,7 +394,7 @@ describe('ShaDa forward compatibility support code', function()
|
|||||||
end
|
end
|
||||||
eq(1, found)
|
eq(1, found)
|
||||||
nvim_command('wshada! ' .. shada_fname)
|
nvim_command('wshada! ' .. shada_fname)
|
||||||
local found = 0
|
found = 0
|
||||||
for i, v in ipairs(read_shada_file(shada_fname)) do
|
for i, v in ipairs(read_shada_file(shada_fname)) do
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
eq(1, v.type)
|
eq(1, v.type)
|
||||||
@@ -432,7 +431,7 @@ describe('ShaDa forward compatibility support code', function()
|
|||||||
end
|
end
|
||||||
eq(1, found)
|
eq(1, found)
|
||||||
nvim_command('wshada! ' .. shada_fname)
|
nvim_command('wshada! ' .. shada_fname)
|
||||||
local found = 0
|
found = 0
|
||||||
for i, v in ipairs(read_shada_file(shada_fname)) do
|
for i, v in ipairs(read_shada_file(shada_fname)) do
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
eq(1, v.type)
|
eq(1, v.type)
|
||||||
|
@@ -9,15 +9,14 @@ local tmpname = os.tmpname()
|
|||||||
local additional_cmd = ''
|
local additional_cmd = ''
|
||||||
|
|
||||||
local function nvim_argv()
|
local function nvim_argv()
|
||||||
local ret
|
local argv = {nvim_prog, '-u', 'NONE', '-i', tmpname, '-N',
|
||||||
local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', tmpname, '-N',
|
'--cmd', 'set shortmess+=I background=light noswapfile',
|
||||||
'--cmd', 'set shortmess+=I background=light noswapfile',
|
'--cmd', additional_cmd,
|
||||||
'--cmd', additional_cmd,
|
'--embed'}
|
||||||
'--embed'}
|
|
||||||
if helpers.prepend_argv then
|
if helpers.prepend_argv then
|
||||||
return merge_args(helpers.prepend_argv, nvim_argv)
|
return merge_args(helpers.prepend_argv, argv)
|
||||||
else
|
else
|
||||||
return nvim_argv
|
return argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -88,7 +87,6 @@ return {
|
|||||||
reset=reset,
|
reset=reset,
|
||||||
set_additional_cmd=set_additional_cmd,
|
set_additional_cmd=set_additional_cmd,
|
||||||
clear=clear,
|
clear=clear,
|
||||||
exc_exec=exc_exec,
|
|
||||||
get_shada_rw=get_shada_rw,
|
get_shada_rw=get_shada_rw,
|
||||||
read_shada_file=read_shada_file,
|
read_shada_file=read_shada_file,
|
||||||
}
|
}
|
||||||
|
@@ -15,15 +15,15 @@ local nvim_current_line = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe('ShaDa support code', function()
|
describe('ShaDa support code', function()
|
||||||
testfilename = 'Xtestfile-functional-shada-marks'
|
local testfilename = 'Xtestfile-functional-shada-marks'
|
||||||
testfilename_2 = 'Xtestfile-functional-shada-marks-2'
|
local testfilename_2 = 'Xtestfile-functional-shada-marks-2'
|
||||||
before_each(function()
|
before_each(function()
|
||||||
reset()
|
reset()
|
||||||
local fd = io.open(testfilename, 'w')
|
local fd = io.open(testfilename, 'w')
|
||||||
fd:write('test\n')
|
fd:write('test\n')
|
||||||
fd:write('test2\n')
|
fd:write('test2\n')
|
||||||
fd:close()
|
fd:close()
|
||||||
local fd = io.open(testfilename_2, 'w')
|
fd = io.open(testfilename_2, 'w')
|
||||||
fd:write('test3\n')
|
fd:write('test3\n')
|
||||||
fd:write('test4\n')
|
fd:write('test4\n')
|
||||||
fd:close()
|
fd:close()
|
||||||
@@ -115,7 +115,7 @@ describe('ShaDa support code', function()
|
|||||||
eq(tf_full, oldfiles[1])
|
eq(tf_full, oldfiles[1])
|
||||||
eq(tf_full_2, oldfiles[2])
|
eq(tf_full_2, oldfiles[2])
|
||||||
nvim_command('rshada!')
|
nvim_command('rshada!')
|
||||||
local oldfiles = meths.get_vvar('oldfiles')
|
oldfiles = meths.get_vvar('oldfiles')
|
||||||
table.sort(oldfiles)
|
table.sort(oldfiles)
|
||||||
eq(2, #oldfiles)
|
eq(2, #oldfiles)
|
||||||
eq(testfilename, oldfiles[1]:sub(-#testfilename))
|
eq(testfilename, oldfiles[1]:sub(-#testfilename))
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
-- ShaDa merging data support
|
-- ShaDa merging data support
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local nvim_command, meths, funcs, curbufmeths, eq =
|
local nvim_command, funcs, curbufmeths, eq =
|
||||||
helpers.command, helpers.meths, helpers.funcs,
|
helpers.command, helpers.funcs,
|
||||||
helpers.curbufmeths, helpers.eq
|
helpers.curbufmeths, helpers.eq
|
||||||
local exc_exec, redir_exec = helpers.exc_exec, helpers.redir_exec
|
local exc_exec, redir_exec = helpers.exc_exec, helpers.redir_exec
|
||||||
|
|
||||||
@@ -870,7 +870,7 @@ describe('ShaDa jumps support code', function()
|
|||||||
end
|
end
|
||||||
wshada(shada)
|
wshada(shada)
|
||||||
eq(0, exc_exec(sdrcmd()))
|
eq(0, exc_exec(sdrcmd()))
|
||||||
local shada = ''
|
shada = ''
|
||||||
for i = 1,101 do
|
for i = 1,101 do
|
||||||
local t = i * 2
|
local t = i * 2
|
||||||
shada = shada .. (
|
shada = shada .. (
|
||||||
@@ -964,7 +964,7 @@ describe('ShaDa changes support code', function()
|
|||||||
end
|
end
|
||||||
wshada(shada)
|
wshada(shada)
|
||||||
eq(0, exc_exec(sdrcmd()))
|
eq(0, exc_exec(sdrcmd()))
|
||||||
local shada = ''
|
shada = ''
|
||||||
for i = 1,101 do
|
for i = 1,101 do
|
||||||
local t = i * 2
|
local t = i * 2
|
||||||
shada = shada .. (
|
shada = shada .. (
|
||||||
@@ -1001,7 +1001,7 @@ describe('ShaDa changes support code', function()
|
|||||||
end
|
end
|
||||||
wshada(shada)
|
wshada(shada)
|
||||||
eq(0, exc_exec(sdrcmd()))
|
eq(0, exc_exec(sdrcmd()))
|
||||||
local shada = ''
|
shada = ''
|
||||||
for i = 1,100 do
|
for i = 1,100 do
|
||||||
shada = shada .. ('\011%c\018\131\162mX\195\161f\196\006/a/b/c\161l%c'
|
shada = shada .. ('\011%c\018\131\162mX\195\161f\196\006/a/b/c\161l%c'
|
||||||
):format(i, i)
|
):format(i, i)
|
||||||
|
@@ -133,7 +133,7 @@ describe('system()', function()
|
|||||||
-- write more than 1mb of data, which should be enough to overcome
|
-- write more than 1mb of data, which should be enough to overcome
|
||||||
-- the os buffer limit and force multiple event loop iterations to write
|
-- the os buffer limit and force multiple event loop iterations to write
|
||||||
-- everything
|
-- everything
|
||||||
for i = 1, 0xffff do
|
for _ = 1, 0xffff do
|
||||||
input[#input + 1] = '01234567890ABCDEFabcdef'
|
input[#input + 1] = '01234567890ABCDEFabcdef'
|
||||||
end
|
end
|
||||||
input = table.concat(input, '\n')
|
input = table.concat(input, '\n')
|
||||||
@@ -299,7 +299,7 @@ describe('systemlist()', function()
|
|||||||
describe('passing a lot of input', function()
|
describe('passing a lot of input', function()
|
||||||
it('returns the program output', function()
|
it('returns the program output', function()
|
||||||
local input = {}
|
local input = {}
|
||||||
for i = 1, 0xffff do
|
for _ = 1, 0xffff do
|
||||||
input[#input + 1] = '01234567890ABCDEFabcdef'
|
input[#input + 1] = '01234567890ABCDEFabcdef'
|
||||||
end
|
end
|
||||||
nvim('set_var', 'input', input)
|
nvim('set_var', 'input', input)
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local thelpers = require('test.functional.terminal.helpers')
|
local thelpers = require('test.functional.terminal.helpers')
|
||||||
local Screen = require('test.functional.ui.screen')
|
|
||||||
local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf
|
local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf
|
||||||
local feed = helpers.feed
|
local feed = helpers.feed
|
||||||
local feed_data = thelpers.feed_data
|
local feed_data = thelpers.feed_data
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local Screen = require('test.functional.ui.screen')
|
|
||||||
local thelpers = require('test.functional.terminal.helpers')
|
local thelpers = require('test.functional.terminal.helpers')
|
||||||
local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
|
local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
|
||||||
local wait = helpers.wait
|
local wait = helpers.wait
|
||||||
|
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')
|
|||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local thelpers = require('test.functional.terminal.helpers')
|
local thelpers = require('test.functional.terminal.helpers')
|
||||||
local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
|
local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
|
||||||
local nvim_dir, execute, eq = helpers.nvim_dir, helpers.execute, helpers.eq
|
local nvim_dir, execute = helpers.nvim_dir, helpers.execute
|
||||||
local hide_cursor = thelpers.hide_cursor
|
local hide_cursor = thelpers.hide_cursor
|
||||||
local show_cursor = thelpers.show_cursor
|
local show_cursor = thelpers.show_cursor
|
||||||
|
|
||||||
|
@@ -2,8 +2,7 @@ local helpers = require('test.functional.helpers')
|
|||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local clear, wait, nvim = helpers.clear, helpers.wait, helpers.nvim
|
local clear, wait, nvim = helpers.clear, helpers.wait, helpers.nvim
|
||||||
local nvim_dir = helpers.nvim_dir
|
local nvim_dir = helpers.nvim_dir
|
||||||
local execute, source = helpers.execute, helpers.source
|
local execute = helpers.execute
|
||||||
local eq, neq = helpers.eq, helpers.neq
|
|
||||||
|
|
||||||
describe(':terminal', function()
|
describe(':terminal', function()
|
||||||
local screen
|
local screen
|
||||||
|
@@ -72,7 +72,7 @@ local function screen_setup(extra_height, command)
|
|||||||
empty_line,
|
empty_line,
|
||||||
empty_line,
|
empty_line,
|
||||||
}
|
}
|
||||||
for i = 1, extra_height do
|
for _ = 1, extra_height do
|
||||||
table.insert(expected, empty_line)
|
table.insert(expected, empty_line)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@ describe('terminal window highlighting', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function descr(title, attr_num, set_attrs_fn)
|
local function descr(title, attr_num, set_attrs_fn)
|
||||||
local function sub(s)
|
local function sub(s)
|
||||||
return s:gsub('NUM', attr_num)
|
return s:gsub('NUM', attr_num)
|
||||||
end
|
end
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
local Screen = require('test.functional.ui.screen')
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local thelpers = require('test.functional.terminal.helpers')
|
local thelpers = require('test.functional.terminal.helpers')
|
||||||
local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf
|
local clear = helpers.clear
|
||||||
local feed, execute, nvim = helpers.feed, helpers.execute, helpers.nvim
|
local feed, nvim = helpers.feed, helpers.nvim
|
||||||
local feed_data = thelpers.feed_data
|
local feed_data = thelpers.feed_data
|
||||||
|
|
||||||
describe('terminal mouse', function()
|
describe('terminal mouse', function()
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
-- Some sanity checks for the TUI using the builtin terminal emulator
|
-- Some sanity checks for the TUI using the builtin terminal emulator
|
||||||
-- as a simple way to send keys and assert screen state.
|
-- as a simple way to send keys and assert screen state.
|
||||||
local Screen = require('test.functional.ui.screen')
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local thelpers = require('test.functional.terminal.helpers')
|
local thelpers = require('test.functional.terminal.helpers')
|
||||||
local feed = thelpers.feed_data
|
local feed = thelpers.feed_data
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local thelpers = require('test.functional.terminal.helpers')
|
local thelpers = require('test.functional.terminal.helpers')
|
||||||
local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
|
local feed, clear = helpers.feed, helpers.clear
|
||||||
local wait, eq = helpers.wait, helpers.eq
|
local wait = helpers.wait
|
||||||
|
|
||||||
|
|
||||||
describe('terminal window', function()
|
describe('terminal window', function()
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local thelpers = require('test.functional.terminal.helpers')
|
local thelpers = require('test.functional.terminal.helpers')
|
||||||
local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf
|
local clear = helpers.clear
|
||||||
local feed, nvim = helpers.feed, helpers.nvim
|
local feed, nvim = helpers.feed, helpers.nvim
|
||||||
local feed_data = thelpers.feed_data
|
|
||||||
|
|
||||||
describe('terminal', function()
|
describe('terminal', function()
|
||||||
local screen
|
local screen
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local clear, feed, nvim = helpers.clear, helpers.feed, helpers.nvim
|
local clear, feed = helpers.clear, helpers.feed
|
||||||
local execute, request, eq = helpers.execute, helpers.request, helpers.eq
|
local execute, request, eq = helpers.execute, helpers.request, helpers.eq
|
||||||
|
|
||||||
|
|
||||||
|
@@ -8,7 +8,6 @@ describe('mappings', function()
|
|||||||
local cid
|
local cid
|
||||||
|
|
||||||
local add_mapping = function(mapping, send)
|
local add_mapping = function(mapping, send)
|
||||||
local str = 'mapped '..mapping
|
|
||||||
local cmd = "nnoremap "..mapping.." :call rpcnotify("..cid..", 'mapped', '"
|
local cmd = "nnoremap "..mapping.." :call rpcnotify("..cid..", 'mapped', '"
|
||||||
..send:gsub('<', '<lt>').."')<cr>"
|
..send:gsub('<', '<lt>').."')<cr>"
|
||||||
execute(cmd)
|
execute(cmd)
|
||||||
|
@@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local request, run, stop = helpers.request, helpers.run, helpers.stop
|
local request, run, stop = helpers.request, helpers.run, helpers.stop
|
||||||
local eq, dedent = helpers.eq, helpers.dedent
|
local dedent = helpers.dedent
|
||||||
|
|
||||||
local Screen = {}
|
local Screen = {}
|
||||||
Screen.__index = Screen
|
Screen.__index = Screen
|
||||||
@@ -294,9 +294,9 @@ end
|
|||||||
|
|
||||||
function Screen:_handle_resize(width, height)
|
function Screen:_handle_resize(width, height)
|
||||||
local rows = {}
|
local rows = {}
|
||||||
for i = 1, height do
|
for _ = 1, height do
|
||||||
local cols = {}
|
local cols = {}
|
||||||
for j = 1, width do
|
for _ = 1, width do
|
||||||
table.insert(cols, {text = ' ', attrs = {}})
|
table.insert(cols, {text = ' ', attrs = {}})
|
||||||
end
|
end
|
||||||
table.insert(rows, cols)
|
table.insert(rows, cols)
|
||||||
|
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')
|
|||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local spawn, set_session, clear = helpers.spawn, helpers.set_session, helpers.clear
|
local spawn, set_session, clear = helpers.spawn, helpers.set_session, helpers.clear
|
||||||
local feed, execute = helpers.feed, helpers.execute
|
local feed, execute = helpers.feed, helpers.execute
|
||||||
local insert, wait = helpers.insert, helpers.wait
|
local insert = helpers.insert
|
||||||
|
|
||||||
describe('Initial screen', function()
|
describe('Initial screen', function()
|
||||||
local screen
|
local screen
|
||||||
@@ -11,9 +11,6 @@ describe('Initial screen', function()
|
|||||||
'--embed'}
|
'--embed'}
|
||||||
|
|
||||||
before_each(function()
|
before_each(function()
|
||||||
if session then
|
|
||||||
session:exit(0)
|
|
||||||
end
|
|
||||||
local screen_nvim = spawn(nvim_argv)
|
local screen_nvim = spawn(nvim_argv)
|
||||||
set_session(screen_nvim)
|
set_session(screen_nvim)
|
||||||
screen = Screen.new()
|
screen = Screen.new()
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local clear, feed, nvim, insert = helpers.clear, helpers.feed, helpers.nvim, helpers.insert
|
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
||||||
local execute, request, eq = helpers.execute, helpers.request, helpers.eq
|
local execute = helpers.execute
|
||||||
|
|
||||||
describe('search highlighting', function()
|
describe('search highlighting', function()
|
||||||
local screen
|
local screen
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local clear, feed, execute = helpers.clear, helpers.feed, helpers.execute
|
local clear, feed = helpers.clear, helpers.feed
|
||||||
local eval, eq, neq = helpers.eval, helpers.eq, helpers.neq
|
local eval, eq, neq = helpers.eval, helpers.eq, helpers.neq
|
||||||
local execute, source = helpers.execute, helpers.source
|
local execute, source = helpers.execute, helpers.source
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user