functests: Check logs in lua code

It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
This commit is contained in:
ZyX 2016-04-24 02:53:11 +03:00
parent a160590e40
commit ff470bb853
212 changed files with 362 additions and 287 deletions

View File

@ -1,5 +1,5 @@
-- Sanity checks for buffer_* API calls via msgpack-rpc -- Sanity checks for buffer_* API calls via msgpack-rpc
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, buffer = helpers.clear, helpers.nvim, helpers.buffer local clear, nvim, buffer = helpers.clear, helpers.nvim, helpers.buffer
local curbuf, curwin, eq = helpers.curbuf, helpers.curwin, helpers.eq local curbuf, curwin, eq = helpers.curbuf, helpers.curwin, helpers.eq
local curbufmeths, ok = helpers.curbufmeths, helpers.ok local curbufmeths, ok = helpers.curbufmeths, helpers.ok

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local clear = helpers.clear local clear = helpers.clear

View File

@ -1,5 +1,5 @@
-- Tests for nvim notifications -- Tests for nvim notifications
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local eq, clear, eval, execute, nvim, next_message = local eq, clear, eval, execute, nvim, next_message =
helpers.eq, helpers.clear, helpers.eval, helpers.execute, helpers.nvim, helpers.eq, helpers.clear, helpers.eval, helpers.execute, helpers.nvim,
helpers.next_message helpers.next_message

View File

@ -1,7 +1,7 @@
-- Tests for some server->client RPC scenarios. Note that unlike with -- Tests for some server->client RPC scenarios. Note that unlike with
-- `rpcnotify`, to evaluate `rpcrequest` calls we need the client event loop to -- `rpcnotify`, to evaluate `rpcrequest` calls we need the client event loop to
-- be running. -- be running.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval
local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop
local nvim_prog = helpers.nvim_prog local nvim_prog = helpers.nvim_prog

View File

@ -1,5 +1,5 @@
-- Sanity checks for tabpage_* API calls via msgpack-rpc -- Sanity checks for tabpage_* API calls via msgpack-rpc
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, tabpage, curtab, eq, ok = local clear, nvim, tabpage, curtab, eq, ok =
helpers.clear, helpers.nvim, helpers.tabpage, helpers.curtab, helpers.eq, helpers.clear, helpers.nvim, helpers.tabpage, helpers.curtab, helpers.eq,
helpers.ok helpers.ok

View File

@ -1,5 +1,5 @@
-- Sanity checks for vim_* API calls via msgpack-rpc -- Sanity checks for vim_* API calls via msgpack-rpc
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local NIL = helpers.NIL local NIL = helpers.NIL
local clear, nvim, eq, neq = helpers.clear, helpers.nvim, helpers.eq, helpers.neq local clear, nvim, eq, neq = helpers.clear, helpers.nvim, helpers.eq, helpers.neq

View File

@ -1,5 +1,5 @@
-- Sanity checks for window_* API calls via msgpack-rpc -- Sanity checks for window_* API calls via msgpack-rpc
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, curbuf, curbuf_contents, window, curwin, eq, neq, local clear, nvim, curbuf, curbuf_contents, window, curwin, eq, neq,
ok, feed, insert, eval = helpers.clear, helpers.nvim, helpers.curbuf, ok, feed, insert, eval = helpers.clear, helpers.nvim, helpers.curbuf,
helpers.curbuf_contents, helpers.window, helpers.curwin, helpers.eq, helpers.curbuf_contents, helpers.window, helpers.curwin, helpers.eq,

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local command = helpers.command local command = helpers.command

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq
describe('TabClosed', function() describe('TabClosed', function()

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local command = helpers.command local command = helpers.command

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq
describe('TabNewEntered', function() describe('TabNewEntered', function()

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local clear, execute, feed, nvim, nvim_dir = helpers.clear, local clear, execute, feed, nvim, nvim_dir = helpers.clear,

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, eval, eq = helpers.clear, helpers.eval, helpers.eq local clear, eval, eq = helpers.clear, helpers.eval, helpers.eq
local feed, execute, expect, command = helpers.feed, helpers.execute, helpers.expect, helpers.command local feed, execute, expect, command = helpers.feed, helpers.execute, helpers.expect, helpers.command
local curbufmeths, funcs, neq = helpers.curbufmeths, helpers.funcs, helpers.neq local curbufmeths, funcs, neq = helpers.curbufmeths, helpers.funcs, helpers.neq

View File

@ -1,6 +1,6 @@
-- Test clipboard provider support -- Test clipboard provider support
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect, eq, eval = helpers.execute, helpers.expect, helpers.eq, helpers.eval local execute, expect, eq, eval = helpers.execute, helpers.expect, helpers.eq, helpers.eval

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, source = helpers.clear, helpers.nvim, helpers.source local clear, nvim, source = helpers.clear, helpers.nvim, helpers.source
local eq, next_msg = helpers.eq, helpers.next_message local eq, next_msg = helpers.eq, helpers.next_message
local exc_exec = helpers.exc_exec local exc_exec = helpers.exc_exec

View File

@ -1,5 +1,5 @@
local lfs = require('lfs') local lfs = require('lfs')
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, execute, eval, eq = helpers.clear, helpers.execute, helpers.eval, helpers.eq local clear, execute, eval, eq = helpers.clear, helpers.execute, helpers.eval, helpers.eq
before_each(function() before_each(function()

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local funcs = helpers.funcs local funcs = helpers.funcs
local meths = helpers.meths local meths = helpers.meths

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local funcs = helpers.funcs local funcs = helpers.funcs
local eval, eq = helpers.eval, helpers.eq local eval, eq = helpers.eval, helpers.eq

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq local eq = helpers.eq
local eval = helpers.eval local eval = helpers.eval
local clear = helpers.clear local clear = helpers.clear

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local eq = helpers.eq local eq = helpers.eq
local funcs = helpers.funcs local funcs = helpers.funcs

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, eq, ok = helpers.clear, helpers.eq, helpers.ok local clear, eq, ok = helpers.clear, helpers.eq, helpers.ok
local neq, execute, funcs = helpers.neq, helpers.execute, helpers.funcs local neq, execute, funcs = helpers.neq, helpers.execute, helpers.funcs
local reltime, reltimestr, reltimefloat = funcs.reltime, funcs.reltimestr, funcs.reltimefloat local reltime, reltimestr, reltimefloat = funcs.reltime, funcs.reltimestr, funcs.reltimefloat

View File

@ -1,5 +1,5 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local nvim, eq, neq, eval = helpers.nvim, helpers.eq, helpers.neq, helpers.eval local nvim, eq, neq, eval = helpers.nvim, helpers.eq, helpers.neq, helpers.eval
local clear, funcs, meths = helpers.clear, helpers.funcs, helpers.meths local clear, funcs, meths = helpers.clear, helpers.funcs, helpers.meths
local os_name = helpers.os_name local os_name = helpers.os_name

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local exc_exec = helpers.exc_exec local exc_exec = helpers.exc_exec
local execute = helpers.execute local execute = helpers.execute
local funcs = helpers.funcs local funcs = helpers.funcs

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local eq = helpers.eq local eq = helpers.eq
local command = helpers.command local command = helpers.command

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local ok, feed, eq, eval = helpers.ok, helpers.feed, helpers.eq, helpers.eval local ok, feed, eq, eval = helpers.ok, helpers.feed, helpers.eq, helpers.eval
local source, nvim_async, run = helpers.source, helpers.nvim_async, helpers.run local source, nvim_async, run = helpers.source, helpers.nvim_async, helpers.run

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, eval, eq = helpers.clear, helpers.eval, helpers.eq local clear, eval, eq = helpers.clear, helpers.eval, helpers.eq
local command = helpers.command local command = helpers.command
describe('v:event', function() describe('v:event', function()

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq local eq = helpers.eq
local feed = helpers.feed local feed = helpers.feed

View File

@ -1,7 +1,7 @@
-- Specs for :cd, :tcd, :lcd and getcwd() -- Specs for :cd, :tcd, :lcd and getcwd()
local lfs = require('lfs') local lfs = require('lfs')
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq local eq = helpers.eq
local call = helpers.call local call = helpers.call

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, execute, feed = helpers.clear, helpers.execute, helpers.feed local clear, execute, feed = helpers.clear, helpers.execute, helpers.feed
local eq, neq, eval = helpers.eq, helpers.neq, helpers.eval local eq, neq, eval = helpers.eq, helpers.neq, helpers.eval

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, execute, feed, ok, eval = local clear, execute, feed, ok, eval =
helpers.clear, helpers.execute, helpers.feed, helpers.ok, helpers.eval helpers.clear, helpers.execute, helpers.feed, helpers.ok, helpers.eval

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, execute, nvim = helpers.clear, helpers.execute, helpers.nvim local clear, execute, nvim = helpers.clear, helpers.execute, helpers.nvim
local expect, feed, command = helpers.expect, helpers.feed, helpers.command local expect, feed, command = helpers.expect, helpers.feed, helpers.command
local eq, eval = helpers.eq, helpers.eval local eq, eval = helpers.eq, helpers.eval

View File

@ -1,5 +1,5 @@
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local buf, eq, execute = helpers.curbufmeths, helpers.eq, helpers.execute local buf, eq, execute = helpers.curbufmeths, helpers.eq, helpers.execute
local feed, nvim_prog, wait = helpers.feed, helpers.nvim_prog, helpers.wait local feed, nvim_prog, wait = helpers.feed, helpers.nvim_prog, helpers.wait

View File

@ -1,7 +1,7 @@
require('os') require('os')
local lfs = require('lfs') local lfs = require('lfs')
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local eval = helpers.eval local eval = helpers.eval
local command = helpers.command local command = helpers.command
local eq, neq = helpers.eq, helpers.neq local eq, neq = helpers.eq, helpers.neq

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
describe(':qa', function() describe(':qa', function()

View File

@ -1,6 +1,6 @@
-- Tests for :recover -- Tests for :recover
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local lfs = require('lfs') local lfs = require('lfs')
local execute, eq, clear, eval, feed, expect, source = local execute, eq, clear, eval, feed, expect, source =
helpers.execute, helpers.eq, helpers.clear, helpers.eval, helpers.feed, helpers.execute, helpers.eq, helpers.clear, helpers.eval, helpers.feed,

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq
describe('sign', function() describe('sign', function()

View File

@ -1,6 +1,6 @@
-- Specs for :write -- Specs for :write
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local eq, eval, clear, write_file, execute, source = local eq, eval, clear, write_file, execute, source =
helpers.eq, helpers.eval, helpers.clear, helpers.write_file, helpers.eq, helpers.eval, helpers.clear, helpers.write_file,
helpers.execute, helpers.source helpers.execute, helpers.source

View File

@ -1,6 +1,6 @@
-- Specs for :wundo and underlying functions -- Specs for :wundo and underlying functions
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local execute, clear, eval, feed, spawn, nvim_prog, set_session = local execute, clear, eval, feed, spawn, nvim_prog, set_session =
helpers.execute, helpers.clear, helpers.eval, helpers.feed, helpers.spawn, helpers.execute, helpers.clear, helpers.eval, helpers.feed, helpers.spawn,
helpers.nvim_prog, helpers.set_session helpers.nvim_prog, helpers.set_session

View File

@ -1,4 +1,5 @@
local helpers, lfs = require('test.functional.helpers'), require('lfs') local helpers = require('test.functional.helpers')(after_each)
local lfs = require('lfs')
local execute, eq, neq, spawn, nvim_prog, set_session, wait, write_file local execute, eq, neq, spawn, nvim_prog, set_session, wait, write_file
= helpers.execute, helpers.eq, helpers.neq, helpers.spawn, = helpers.execute, helpers.eq, helpers.neq, helpers.spawn,
helpers.nvim_prog, helpers.set_session, helpers.wait, helpers.write_file helpers.nvim_prog, helpers.set_session, helpers.wait, helpers.write_file

View File

@ -1,4 +1,4 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, meths, funcs, eq = local clear, meths, funcs, eq =
helpers.clear, helpers.meths, helpers.funcs, helpers.eq helpers.clear, helpers.meths, helpers.funcs, helpers.eq

View File

@ -1,8 +1,13 @@
require('coxpcall') require('coxpcall')
local lfs = require('lfs') local lfs = require('lfs')
local assert = require('luassert')
local ChildProcessStream = require('nvim.child_process_stream') local ChildProcessStream = require('nvim.child_process_stream')
local Session = require('nvim.session') local Session = require('nvim.session')
local global_helpers = require('test.helpers')
local check_logs = global_helpers.check_logs
local neq = global_helpers.neq
local eq = global_helpers.eq
local ok = global_helpers.ok
local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim' local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim'
local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N', local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
@ -267,18 +272,6 @@ local function source(code)
return tmpname return tmpname
end end
local function eq(expected, actual)
return assert.are.same(expected, actual)
end
local function neq(expected, actual)
return assert.are_not.same(expected, actual)
end
local function ok(expr)
assert.is_true(expr)
end
local function nvim(method, ...) local function nvim(method, ...)
return request('vim_'..method, ...) return request('vim_'..method, ...)
end end
@ -412,6 +405,10 @@ local curbufmeths = create_callindex(curbuf)
local curwinmeths = create_callindex(curwin) local curwinmeths = create_callindex(curwin)
local curtabmeths = create_callindex(curtab) local curtabmeths = create_callindex(curtab)
return function(after_each)
if after_each then
after_each(check_logs)
end
return { return {
prepend_argv = prepend_argv, prepend_argv = prepend_argv,
clear = clear, clear = clear,
@ -461,5 +458,6 @@ return {
curbufmeths = curbufmeths, curbufmeths = curbufmeths,
curwinmeths = curwinmeths, curwinmeths = curwinmeths,
curtabmeths = curtabmeths, curtabmeths = curtabmeths,
NIL = mpack.NIL NIL = mpack.NIL,
} }
end

View File

@ -1,5 +1,5 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, eq, eval, execute, feed, insert, neq, next_msg, nvim, local clear, eq, eval, execute, feed, insert, neq, next_msg, nvim,
nvim_dir, ok, source, write_file, mkdir, rmdir = helpers.clear, nvim_dir, ok, source, write_file, mkdir, rmdir = helpers.clear,
helpers.eq, helpers.eval, helpers.execute, helpers.feed, helpers.eq, helpers.eval, helpers.execute, helpers.feed,

View File

@ -1,7 +1,7 @@
-- Test if URLs are recognized as filenames by commands such as "gf". Here -- Test if URLs are recognized as filenames by commands such as "gf". Here
-- we'll use `expand("<cfile>")` since "gf" would need to open the file. -- we'll use `expand("<cfile>")` since "gf" would need to open the file.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -3,7 +3,7 @@
-- There are 50+ test command blocks (the stuff between STARTTEST and ENDTEST) -- There are 50+ test command blocks (the stuff between STARTTEST and ENDTEST)
-- in the original test. These have been converted to "it" test cases here. -- in the original test. These have been converted to "it" test cases here.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert 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

View File

@ -2,7 +2,7 @@
-- Test for autocommand that changes current buffer on BufEnter event. -- Test for autocommand that changes current buffer on BufEnter event.
-- Check if modelines are interpreted for the correct buffer. -- Check if modelines are interpreted for the correct buffer.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- Test for autocommand that deletes the current buffer on BufLeave event. -- Test for autocommand that deletes the current buffer on BufLeave event.
-- Also test deleting the last buffer, should give a new, empty buffer. -- Also test deleting the last buffer, should give a new, empty buffer.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Test for autocommand that redefines the argument list, when doing ":all". -- Test for autocommand that redefines the argument list, when doing ":all".
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, dedent, eq = helpers.execute, helpers.dedent, helpers.eq local execute, dedent, eq = helpers.execute, helpers.dedent, helpers.eq
local curbuf_contents = helpers.curbuf_contents local curbuf_contents = helpers.curbuf_contents

View File

@ -1,6 +1,6 @@
-- Test for autocommand that changes the buffer list, when doing ":ball". -- Test for autocommand that changes the buffer list, when doing ":ball".
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Test for Bufleave autocommand that deletes the buffer we are about to edit. -- Test for Bufleave autocommand that deletes the buffer we are about to edit.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, insert = helpers.clear, helpers.insert local clear, insert = helpers.clear, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- Test for 'errorformat'. This will fail if the quickfix feature was -- Test for 'errorformat'. This will fail if the quickfix feature was
-- disabled. -- disabled.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, clear, execute = helpers.feed, helpers.clear, helpers.execute local feed, clear, execute = helpers.feed, helpers.clear, helpers.execute
local expect, write_file = helpers.expect, helpers.write_file local expect, write_file = helpers.expect, helpers.write_file

View File

@ -12,7 +12,8 @@
-- Use a FileChangedShell autocommand to avoid a prompt for "Xtestfile.gz" -- Use a FileChangedShell autocommand to avoid a prompt for "Xtestfile.gz"
-- being modified outside of Vim (noticed on Solaris). -- being modified outside of Vim (noticed on Solaris).
local helpers, lfs = require('test.functional.helpers'), require('lfs') local helpers= require('test.functional.helpers')(after_each)
local lfs = require('lfs')
local clear, execute, expect, eq, neq, dedent, write_file, feed = local clear, execute, expect, eq, neq, dedent, write_file, feed =
helpers.clear, helpers.execute, helpers.expect, helpers.eq, helpers.neq, helpers.clear, helpers.execute, helpers.expect, helpers.eq, helpers.neq,
helpers.dedent, helpers.write_file, helpers.feed helpers.dedent, helpers.write_file, helpers.feed

View File

@ -2,7 +2,7 @@
-- Also test formatting a paragraph. -- Also test formatting a paragraph.
-- Also test undo after ":%s" and formatting. -- Also test undo after ":%s" and formatting.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert 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

View File

@ -1,6 +1,6 @@
-- Tests for not doing smart indenting when it isn't set. -- Tests for not doing smart indenting when it isn't set.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- Tests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set. -- Tests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.
-- Also test that dv_ works correctly -- Also test that dv_ works correctly
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert 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

View File

@ -3,7 +3,7 @@
-- First test for undo working properly when executing commands from a register. -- First test for undo working properly when executing commands from a register.
-- Also test this in an empty buffer. -- Also test this in an empty buffer.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- vim: set foldmethod=marker foldmarker=[[,]] : -- vim: set foldmethod=marker foldmarker=[[,]] :
-- Tests for [ CTRL-I with a count and CTRL-W CTRL-I with a count -- Tests for [ CTRL-I with a count and CTRL-W CTRL-I with a count
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Tests for file with some lines ending in CTRL-M, some not -- Tests for file with some lines ending in CTRL-M, some not
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed = helpers.clear, helpers.feed local clear, feed = helpers.clear, helpers.feed
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Tests for complicated + argument to :edit command -- Tests for complicated + argument to :edit command
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, insert = helpers.clear, helpers.insert local clear, insert = helpers.clear, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- Test for jumping to a tag with 'hidden' set, with symbolic link in path of tag. -- Test for jumping to a tag with 'hidden' set, with symbolic link in path of tag.
-- This only works for Unix, because of the symbolic link. -- This only works for Unix, because of the symbolic link.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Test for :execute, :while and :if -- Test for :execute, :while and :if
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect
local source = helpers.source local source = helpers.source

View File

@ -1,6 +1,6 @@
-- Test for sourcing a file with CTRL-V's at the end of the line -- Test for sourcing a file with CTRL-V's at the end of the line
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Test for joining lines with marks in them (and with 'joinspaces' set/reset) -- Test for joining lines with marks in them (and with 'joinspaces' set/reset)
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert 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

View File

@ -9,9 +9,14 @@
-- :buf -- :buf
-- :edit -- :edit
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect local feed = helpers.feed
local clear = helpers.clear
local source = helpers.source
local insert = helpers.insert
local expect = helpers.expect
local execute = helpers.execute
describe('Commands that close windows and/or buffers', function() describe('Commands that close windows and/or buffers', function()
setup(clear) setup(clear)

View File

@ -2,7 +2,7 @@
-- Test for 'lisp' -- Test for 'lisp'
-- If the lisp feature is not enabled, this will fail! -- If the lisp feature is not enabled, this will fail!
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -3,7 +3,7 @@
-- Also test that a builtin function cannot be replaced. -- Also test that a builtin function cannot be replaced.
-- Also test for regression when calling arbitrary expression. -- Also test for regression when calling arbitrary expression.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert, source = helpers.feed, helpers.insert, helpers.source 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

View File

@ -1,7 +1,7 @@
-- Test Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal, -- Test Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal,
-- and octal numbers. -- and octal numbers.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Test character classes in regexp using regexpengine 0, 1, 2. -- Test character classes in regexp using regexpengine 0, 1, 2.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
local source, write_file = helpers.source, helpers.write_file local source, write_file = helpers.source, helpers.write_file
local os_name = helpers.os_name local os_name = helpers.os_name

View File

@ -1,6 +1,6 @@
-- Test Virtual replace mode. -- Test Virtual replace mode.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed = helpers.feed local feed = helpers.feed
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- Test Visual block mode commands -- Test Visual block mode commands
-- And test "U" in Visual mode, also on German sharp S. -- And test "U" in Visual mode, also on German sharp S.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local nvim, eq = helpers.meths, helpers.eq local nvim, eq = helpers.meths, helpers.eq
local insert, feed = helpers.insert, helpers.feed local insert, feed = helpers.insert, helpers.feed
local clear, expect = helpers.clear, helpers.expect local clear, expect = helpers.clear, helpers.expect

View File

@ -1,6 +1,6 @@
-- Test for writing and reading a file of over 100 Kbyte -- Test for writing and reading a file of over 100 Kbyte
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- vim: set foldmethod=marker foldmarker=[[,]] : -- vim: set foldmethod=marker foldmarker=[[,]] :
-- Tests for regexp with various magic settings. -- Tests for regexp with various magic settings.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -3,7 +3,7 @@
-- --
-- This test contains both "test44" and "test99" from the old test suite. -- This test contains both "test44" and "test99" from the old test suite.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert 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

View File

@ -1,6 +1,6 @@
-- Tests for folding. -- Tests for folding.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert, clear, execute, expect = local feed, insert, clear, execute, expect =
helpers.feed, helpers.insert, helpers.clear, helpers.execute, helpers.expect helpers.feed, helpers.insert, helpers.clear, helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- vim: set foldmethod=marker foldmarker=[[,]] : -- vim: set foldmethod=marker foldmarker=[[,]] :
-- Tests for multi-line regexps with ":s" -- Tests for multi-line regexps with ":s"
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local expect = helpers.expect local expect = helpers.expect

View File

@ -2,7 +2,7 @@
-- Tests for ":highlight". -- Tests for ":highlight".
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed = helpers.clear, helpers.feed local clear, feed = helpers.clear, helpers.feed
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect
local wait = helpers.wait local wait = helpers.wait

View File

@ -1,6 +1,6 @@
-- Some tests for buffer-local autocommands -- Some tests for buffer-local autocommands
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, execute, eq = helpers.clear, helpers.execute, helpers.eq local clear, execute, eq = helpers.clear, helpers.execute, helpers.eq
local curbuf_contents = helpers.curbuf_contents local curbuf_contents = helpers.curbuf_contents

View File

@ -1,6 +1,6 @@
-- Tests for List and Dictionary types. -- Tests for List and Dictionary types.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, source = helpers.feed, 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

View File

@ -1,7 +1,7 @@
-- vim: set foldmethod=marker foldmarker=[[,]] : -- vim: set foldmethod=marker foldmarker=[[,]] :
-- Test for script-local function. -- Test for script-local function.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local expect = helpers.expect local expect = helpers.expect

View File

@ -1,6 +1,6 @@
-- Tests for :sort command. -- Tests for :sort command.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local insert, execute, clear, expect, eq, eval, source = helpers.insert, local insert, execute, clear, expect, eq, eval, source = helpers.insert,
helpers.execute, helpers.clear, helpers.expect, helpers.eq, helpers.eval, helpers.execute, helpers.clear, helpers.expect, helpers.eq, helpers.eval,
helpers.source helpers.source

View File

@ -1,6 +1,6 @@
-- Tests for spell checking with 'encoding' set to "utf-8". -- Tests for spell checking with 'encoding' set to "utf-8".
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert, source = helpers.feed, helpers.insert, helpers.source 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
local write_file, call = helpers.write_file, helpers.call local write_file, call = helpers.write_file, helpers.call

View File

@ -1,6 +1,6 @@
-- Tests for the exists() and has() functions. -- Tests for the exists() and has() functions.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local source = helpers.source local source = helpers.source
local clear, expect = helpers.clear, helpers.expect local clear, expect = helpers.clear, helpers.expect
local write_file = helpers.write_file local write_file = helpers.write_file

View File

@ -1,9 +1,15 @@
-- Tests for undo tree and :earlier and :later. -- Tests for undo tree and :earlier and :later.
local helpers = require('test.functional.helpers')(after_each)
local helpers = require('test.functional.helpers') local write_file = helpers.write_file
local expect, feed, source = helpers.expect, helpers.feed, helpers.source local execute = helpers.execute
local eval, clear, execute = helpers.eval, helpers.clear, helpers.execute local command = helpers.command
local write_file, command, eq = helpers.write_file, helpers.command, helpers.eq local source = helpers.source
local expect = helpers.expect
local clear = helpers.clear
local feed = helpers.feed
local eval = helpers.eval
local eq = helpers.eq
local function expect_empty_buffer() local function expect_empty_buffer()
-- The space will be removed by helpers.dedent but is needed because dedent -- The space will be removed by helpers.dedent but is needed because dedent

View File

@ -1,6 +1,6 @@
-- Tests for tab pages -- Tests for tab pages
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert, source, clear, execute, expect, eval, eq = local feed, insert, source, clear, execute, expect, eval, eq =
helpers.feed, helpers.insert, helpers.source, helpers.clear, helpers.feed, helpers.insert, helpers.source, helpers.clear,
helpers.execute, helpers.expect, helpers.eval, helpers.eq helpers.execute, helpers.expect, helpers.eval, helpers.eq

View File

@ -1,6 +1,6 @@
-- Tests for adjusting window and contents -- Tests for adjusting window and contents
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local feed, insert = helpers.feed, helpers.insert local feed, insert = helpers.feed, helpers.insert
local eval, clear, execute = helpers.eval, helpers.clear, helpers.execute local eval, clear, execute = helpers.eval, helpers.clear, helpers.execute

View File

@ -1,6 +1,6 @@
-- Test for floating point and logical operators. -- Test for floating point and logical operators.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local insert, source = helpers.insert, helpers.source local insert, source = helpers.insert, helpers.source
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- vim: set foldmethod=marker foldmarker=[[,]] : -- vim: set foldmethod=marker foldmarker=[[,]] :
-- Test for visual block shift and tab characters. -- Test for visual block shift and tab characters.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- Test that groups and patterns are tested correctly when calling exists() for -- Test that groups and patterns are tested correctly when calling exists() for
-- autocommands. -- autocommands.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear local clear = helpers.clear
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,10 @@
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect local feed = helpers.feed
local clear = helpers.clear
local insert = helpers.insert
local execute = helpers.execute
local expect = helpers.expect
describe('text formatting', function() describe('text formatting', function()
setup(clear) setup(clear)

View File

@ -2,7 +2,7 @@
-- Since this script is sourced we need to explicitly break changes up in -- Since this script is sourced we need to explicitly break changes up in
-- undo-able pieces. Do that by setting 'undolevels'. -- undo-able pieces. Do that by setting 'undolevels'.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert 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

View File

@ -1,6 +1,7 @@
-- Tests for storing global variables in the .shada file -- Tests for storing global variables in the .shada file
local helpers, lfs = require('test.functional.helpers'), require('lfs') local helpers = require('test.functional.helpers')(after_each)
local lfs = require('lfs')
local clear, execute, eq, neq, eval, wait, spawn = local clear, execute, eq, neq, eval, wait, spawn =
helpers.clear, helpers.execute, helpers.eq, helpers.neq, helpers.eval, helpers.clear, helpers.execute, helpers.eq, helpers.neq, helpers.eval,
helpers.wait, helpers.spawn helpers.wait, helpers.spawn

View File

@ -1,7 +1,7 @@
-- Tests for maparg(). -- Tests for maparg().
-- Also test utf8 map with a 0x80 byte. -- Also test utf8 map with a 0x80 byte.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed = helpers.clear, helpers.feed local clear, feed = helpers.clear, helpers.feed
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,6 +1,6 @@
-- Tests for completefunc/omnifunc. -- Tests for completefunc/omnifunc.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert, source = helpers.feed, helpers.insert, helpers.source local feed, insert, source = helpers.feed, helpers.insert, helpers.source
local clear, expect, execute = helpers.clear, helpers.expect, helpers.execute local clear, expect, execute = helpers.clear, helpers.expect, helpers.execute

View File

@ -6,7 +6,7 @@
-- cksum is part of POSIX and so should be available on most Unixes. -- cksum is part of POSIX and so should be available on most Unixes.
-- If it isn't available then the test will be skipped. -- If it isn't available then the test will be skipped.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed = helpers.feed local feed = helpers.feed
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect

View File

@ -3,7 +3,7 @@
-- restored. We need about 10000 lines of 100 characters to get two levels of -- restored. We need about 10000 lines of 100 characters to get two levels of
-- pointer blocks. -- pointer blocks.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, expect, source = helpers.clear, helpers.expect, helpers.source local clear, expect, source = helpers.clear, helpers.expect, helpers.source
describe('78', function() describe('78', function()

View File

@ -2,7 +2,7 @@
-- Test for submatch() on substitue(). -- Test for submatch() on substitue().
-- Test for *:s%* on :substitute. -- Test for *:s%* on :substitute.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert 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

View File

@ -1,6 +1,6 @@
-- Test for t movement command and 'cpo-;' setting -- Test for t movement command and 'cpo-;' setting
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect local execute, expect = helpers.execute, helpers.expect

View File

@ -1,7 +1,7 @@
-- Tests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c) -- Tests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c)
-- Also test "g~ap". -- Also test "g~ap".
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, source = helpers.feed, 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

View File

@ -1,6 +1,6 @@
-- Tests for tag search with !_TAG_FILE_ENCODING. -- Tests for tag search with !_TAG_FILE_ENCODING.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local insert, source, clear, expect, write_file = helpers.insert, local insert, source, clear, expect, write_file = helpers.insert,
helpers.source, helpers.clear, helpers.expect, helpers.write_file helpers.source, helpers.clear, helpers.expect, helpers.write_file

View File

@ -1,6 +1,6 @@
-- 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')(after_each)
local insert, source = helpers.insert, helpers.source local insert, source = helpers.insert, helpers.source
local clear, expect = helpers.clear, helpers.expect local clear, expect = helpers.clear, helpers.expect

View File

@ -1,7 +1,7 @@
-- Tests for correct display (cursor column position) with +conceal and -- Tests for correct display (cursor column position) with +conceal and
-- tabulators. -- tabulators.
local helpers = require('test.functional.helpers') local helpers = require('test.functional.helpers')(after_each)
local feed, insert, clear, execute = local feed, insert, clear, execute =
helpers.feed, helpers.insert, helpers.clear, helpers.execute helpers.feed, helpers.insert, helpers.clear, helpers.execute

Some files were not shown because too many files have changed in this diff Show More