mirror of
https://github.com/neovim/neovim.git
synced 2026-04-28 10:14:06 +00:00
test: improve test conventions
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
local t = require('test.functional.testutil')()
|
||||
local clear, feed_command = t.clear, t.feed_command
|
||||
local feed, next_msg, eq = t.feed, t.next_msg, t.eq
|
||||
local command = t.command
|
||||
local expect = t.expect
|
||||
local curbuf_contents = t.curbuf_contents
|
||||
local api = t.api
|
||||
local exec_lua = t.exec_lua
|
||||
local write_file = t.write_file
|
||||
local fn = t.fn
|
||||
local eval = t.eval
|
||||
local t = require('test.testutil')
|
||||
local n = require('test.functional.testnvim')()
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
|
||||
local clear, feed_command = n.clear, n.feed_command
|
||||
local feed, next_msg, eq = n.feed, n.next_msg, t.eq
|
||||
local command = n.command
|
||||
local expect = n.expect
|
||||
local curbuf_contents = n.curbuf_contents
|
||||
local api = n.api
|
||||
local exec_lua = n.exec_lua
|
||||
local write_file = t.write_file
|
||||
local fn = n.fn
|
||||
local eval = n.eval
|
||||
|
||||
before_each(clear)
|
||||
|
||||
describe('mappings', function()
|
||||
|
||||
Reference in New Issue
Block a user