test(harness): migrate away from magic globals

Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.

- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
  merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
  "know" about the various magic symbols.

So they harm DX, which means they serve no purpose at all.

Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
  `t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
This commit is contained in:
Justin M. Keyes
2026-07-20 17:16:51 +02:00
parent a71ee754ee
commit 6d8c8b18d5
535 changed files with 771 additions and 115 deletions

View File

@@ -43,7 +43,6 @@ globals = {
}
exclude_files = {
'test/_meta.lua',
'test/functional/fixtures/lua/syntax_error.lua',
'runtime/lua/vim/treesitter/_meta.lua',
'runtime/lua/vim/_meta/vimfn.gen.lua',

View File

@@ -1,28 +0,0 @@
--- @meta
--- @param name string
--- @param fn? fun()
function it(name, fn) end
--- @param name string
--- @param fn fun()
function describe(name, fn) end
--- @param name? string
--- @param block? fun()|string
function pending(name, block) end
--- @param fn fun()
function setup(fn) end
--- @param fn fun()
function before_each(fn) end
--- @param fn fun()
function after_each(fn) end
--- @param fn fun()
function teardown(fn) end
--- @param fn fun()
function finally(fn) end

View File

@@ -1,5 +1,7 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear = n.clear
local exec_lua = n.exec_lua

View File

@@ -1,7 +1,9 @@
-- Test for benchmarking the RE engine.
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local describe, it, setup, teardown = t.describe, t.it, t.setup, t.teardown
local insert, source = n.insert, n.source
local clear, command = n.clear, n.command

View File

@@ -1,5 +1,7 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local exec_lua = n.exec_lua
describe('decor perf', function()

View File

@@ -1,3 +1,5 @@
local t = require('test.testutil')
local describe, it = t.describe, t.it
local N = 20
local function tcall(f, ...)

View File

@@ -1,6 +1,8 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear = n.clear
local exec_lua = n.exec_lua

View File

@@ -1,3 +1,5 @@
local t = require('test.testutil')
local describe, it = t.describe, t.it
local N = 500
local test_table_size = 100000

View File

@@ -1,5 +1,6 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local describe, it = t.describe, t.it
local clear = n.clear
local api = n.api
local fn = n.fn

View File

@@ -1,5 +1,7 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local bench = n.bench

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local api = n.api
local function rand_utf8(count, seed)

View File

@@ -1,5 +1,6 @@
local t = require('test.testutil')
local describe, it = t.describe, t.it
describe('vim.text', function()
local input, output = string.rep('😂', 2 ^ 16), string.rep('F09F9882', 2 ^ 16)

View File

@@ -1,6 +1,8 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local exec_lua = n.exec_lua

View File

@@ -1,5 +1,6 @@
local t = require('test.testutil')
local describe, it = t.describe, t.it
describe('vim.trim()', function()
local strings = {
['10000 whitespace characters'] = string.rep(' ', 10000),

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, pending = t.describe, t.it, t.before_each, t.pending
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -2,6 +2,8 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each, setup, teardown, finally =
t.describe, t.it, t.before_each, t.after_each, t.setup, t.teardown, t.finally
local clear = n.clear
local eq = t.eq
local ok = t.ok

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq, ok = t.eq, t.ok
local fn = n.fn

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local NIL = vim.NIL
local clear = n.clear
local command = n.command

View File

@@ -4,6 +4,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, eval, eq, ok = n.clear, n.eval, t.eq, t.ok
local api, command, fn = n.api, n.command, n.fn
local pcall_err, assert_alive = t.pcall_err, n.assert_alive

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local request = n.request
local eq = t.eq
local ok = t.ok

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq = t.eq
local exec_lua = n.exec_lua

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, eq, neq = n.clear, t.eq, t.neq
local command = n.command
local exec_capture = n.exec_capture

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local eq, neq = t.eq, t.neq

View File

@@ -1,6 +1,8 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local feed = n.feed

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq = t.eq
local fn = n.fn

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local eq, clear, eval, command, next_msg = t.eq, n.clear, n.eval, n.command, n.next_msg
local api = n.api
local exec_lua = n.exec_lua

View File

@@ -3,6 +3,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each, pending, finally =
t.describe, t.it, t.before_each, t.after_each, t.pending, t.finally
local clear, eval = n.clear, n.eval
local eq, neq, run, stop = t.eq, t.neq, n.run, n.stop
local nvim_prog, command, fn = n.nvim_prog, n.command, n.fn

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, eq, ok = n.clear, t.eq, t.ok
local matches = t.matches
local exec = n.exec

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, finally = t.describe, t.it, t.before_each, t.finally
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, setup = t.describe, t.it, t.before_each, t.setup
local clear, fn, eq = n.clear, n.fn, t.eq
local api = n.api
local matches = t.matches

View File

@@ -1,6 +1,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each, setup, teardown, finally =
t.describe, t.it, t.before_each, t.after_each, t.setup, t.teardown, t.finally
local uv = vim.uv
local dedent = t.dedent

View File

@@ -3,6 +3,8 @@ local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local tt = require('test.functional.testterm')
local describe, it, before_each, after_each, finally =
t.describe, t.it, t.before_each, t.after_each, t.finally
local clear, curbuf, curbuf_contents, curwin, eq, neq, matches, ok, feed, insert, eval =
n.clear,
n.api.nvim_get_current_buf,

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq = t.eq
local api = n.api

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local assert_visible = n.assert_visible
local assert_alive = n.assert_alive
local dedent = t.dedent

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local call = n.call

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq = t.eq
local feed = n.feed

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq = t.eq
local eval = n.eval

View File

@@ -1,6 +1,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, setup, teardown =
t.describe, t.it, t.before_each, t.setup, t.teardown
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,5 +1,7 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local describe, it, before_each = t.describe, t.it, t.before_each
local eval = n.eval
local clear = n.clear
local command = n.command

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local tt = require('test.functional.testterm')
local describe, it, before_each, teardown = t.describe, t.it, t.before_each, t.teardown
local clear = n.clear
local feed_data = tt.feed_data

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local api = n.api
local clear = n.clear
local command = n.command

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, eval, eq = n.clear, n.eval, t.eq
local feed, command = n.feed, n.command
local exec_lua = n.exec_lua

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local eq = t.eq
local eval = n.eval
local clear = n.clear

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq = t.eq
local eval = n.eval

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local eq = t.eq
local exec = n.exec

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local api = n.api

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local dedent = t.dedent

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, finally = t.describe, t.it, t.before_each, t.finally
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, eq = n.clear, t.eq
local command = n.command
local eval = n.eval

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local exec_lua = n.exec_lua

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local dedent = t.dedent

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local uv = vim.uv
local clear, command, testprg = n.clear, n.command, n.testprg

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local it, finally = t.it, t.finally
local clear = n.clear
local exec = n.exec
local command = n.command

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, eval, eq = n.clear, n.eval, t.eq
local feed, command, expect = n.feed, n.command, n.expect
local api, fn, neq = n.api, n.fn, t.neq

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear = n.clear
local eq = t.eq
local eval = n.eval

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, finally = t.describe, t.it, t.before_each, t.finally
local clear, eq, eval, next_msg, ok, source = n.clear, t.eq, n.eval, n.next_msg, t.ok, n.source
local command, fn, api = n.command, n.fn, n.api
local feed = n.feed

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local eq = t.eq
local clear = n.clear
local command = n.command

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local assert_alive = n.assert_alive
local command = n.command
local feed_command = n.feed_command

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local uv = vim.uv
local assert_log = t.assert_log

View File

@@ -3,6 +3,8 @@ local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local tt = require('test.functional.testterm')
local describe, it, before_each, pending, finally =
t.describe, t.it, t.before_each, t.pending, t.finally
local clear = n.clear
local eq = t.eq
local eval = n.eval

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local eq = t.eq
local exec_lua = n.exec_lua
local clear = n.clear

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local tt = require('test.functional.testterm')
local describe, it, after_each = t.describe, t.it, t.after_each
local assert_log = t.assert_log
local clear = n.clear
local command = n.command

View File

@@ -1,6 +1,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each, finally =
t.describe, t.it, t.before_each, t.after_each, t.finally
local uv = vim.uv
local eq = t.eq

View File

@@ -1,6 +1,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, setup, teardown =
t.describe, t.it, t.before_each, t.setup, t.teardown
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,6 +1,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each, finally =
t.describe, t.it, t.before_each, t.after_each, t.finally
local eq, neq, eval = t.eq, t.neq, n.eval
local clear, fn, api = n.clear, n.fn, n.api
local matches = t.matches

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local eq = t.eq
local pcall_err = t.pcall_err
local clear = n.clear

View File

@@ -2,6 +2,8 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each, setup, teardown, finally =
t.describe, t.it, t.before_each, t.after_each, t.setup, t.teardown, t.finally
local assert_alive = n.assert_alive
local assert_log = t.assert_log
local clear = n.clear

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local eq, clear, eval, feed, api, retry = t.eq, n.clear, n.eval, n.feed, n.api, t.retry
describe('K', function()

View File

@@ -3,6 +3,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local feed = n.feed
local api = n.api
local fn = n.fn

View File

@@ -1,4 +1,5 @@
local t = require('test.testutil')
local describe, it, before_each, finally = t.describe, t.it, t.before_each, t.finally
local pcall_err = t.pcall_err
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local eq = t.eq
local eval = n.eval
local feed = n.feed

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, feed, source = n.clear, n.feed, n.source
local command = n.command
local poke_eventloop = n.poke_eventloop
@@ -17,7 +18,7 @@ describe('CTRL-C (mapped)', function()
it('interrupts :global', function()
-- Crashes luajit.
if t.skip_fragile(pending) then
if t.skip_fragile(t.pending) then
return
end

View File

@@ -8,6 +8,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it = t.describe, t.it
describe('default', function()
describe('autocommands', function()
it('nvim.terminal.TermClose closes terminal with default shell on success', function()

View File

@@ -1,6 +1,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each, setup =
t.describe, t.it, t.before_each, t.after_each, t.setup
local clear = n.clear
local insert = n.insert
local exec = n.exec

View File

@@ -3,6 +3,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, setup, teardown =
t.describe, t.it, t.before_each, t.setup, t.teardown
local exec_lua = n.exec_lua
local command = n.command
local eq = t.eq

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear = n.clear
local command = n.command
local dedent = t.dedent

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, pending = t.describe, t.it, t.before_each, t.pending
local clear, insert, eq = n.clear, n.insert, t.eq
local command, expect = n.command, n.expect
local feed, eval = n.feed, n.eval

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, pending = t.describe, t.it, t.before_each, t.pending
local eq, neq, call = t.eq, t.neq, n.call
local eval, feed, clear = n.eval, n.feed, n.clear
local command, insert, expect = n.command, n.insert, n.expect

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local Screen = require('test.functional.ui.screen')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local eq = t.eq
local eval = n.eval
local feed = n.feed

View File

@@ -2,6 +2,8 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each, finally =
t.describe, t.it, t.before_each, t.after_each, t.finally
local api = n.api
local clear = n.clear
local command = n.command

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, feed, insert = n.clear, n.feed, n.insert
local command = n.command
local exec_lua = n.exec_lua

View File

@@ -4,6 +4,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, insert, fn, eq, feed = n.clear, n.insert, n.fn, t.eq, n.feed
local eval = n.eval
local command = n.command

View File

@@ -4,6 +4,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear, feed, insert = n.clear, n.feed, n.insert
local expect = n.expect
local command = n.command

View File

@@ -4,6 +4,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local feed = n.feed
local fn = n.fn

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local insert = n.insert
local feed = n.feed

View File

@@ -1,6 +1,8 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each, setup, teardown, finally =
t.describe, t.it, t.before_each, t.after_each, t.setup, t.teardown, t.finally
local clear = n.clear
local eq = t.eq
local eval = n.eval

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local clear = n.clear
local command = n.command
local eq = t.eq

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local api = n.api
local clear = n.clear
local command = n.command

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear = n.clear
local command = n.command
local expect = n.expect

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local eq = t.eq
local eval = n.eval
local clear = n.clear

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local eq = t.eq
local dedent = t.dedent
local exec = n.exec

View File

@@ -1,6 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each = t.describe, t.it, t.before_each
local eq, command, fn = t.eq, n.command, n.fn
local ok = t.ok
local matches = t.matches

View File

@@ -3,6 +3,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local eq = t.eq
local pcall_err = t.pcall_err
local call = n.call

View File

@@ -2,6 +2,7 @@ local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear = n.clear
local feed = n.feed
local eq = t.eq

View File

@@ -1,6 +1,8 @@
local n = require('test.functional.testnvim')()
local t = require('test.testutil')
local Screen = require('test.functional.ui.screen')
local describe, it, before_each = t.describe, t.it, t.before_each
local feed = n.feed
local clear = n.clear

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