mirror of
https://github.com/neovim/neovim.git
synced 2026-07-14 05:10:36 +00:00
test: replace busted with local harness
Replace the busted-based Lua test runner with a repo-local harness. The new harness runs spec files directly under `nvim -ll`, ships its own reporter and lightweight `luassert` shim, and keeps the helper/preload flow used by the functional and unit test suites. Keep the file boundary model shallow and busted-like by restoring `_G`, `package.loaded`, `package.preload`, `arg`, and the process environment between files, without carrying extra reset APIs or custom assertion machinery. Update the build and test entrypoints to use the new runner, add black-box coverage for the harness itself, and drop the bundled busted/luacheck dependency path. AI-assisted: Codex
This commit is contained in:
@@ -47,7 +47,6 @@
|
||||
|
||||
local t = require('test.testutil')
|
||||
local n = require('test.functional.testnvim')()
|
||||
local busted = require('busted')
|
||||
local uv = vim.uv
|
||||
|
||||
local deepcopy = vim.deepcopy
|
||||
@@ -911,7 +910,7 @@ between asynchronous (feed(), nvim_input()) and synchronous API calls.
|
||||
if eof then
|
||||
err = err .. '\n\n' .. eof[2]
|
||||
end
|
||||
busted.fail(err .. '\n\nSnapshot:\n' .. self:_print_snapshot(), 3)
|
||||
error(err .. '\n\nSnapshot:\n' .. self:_print_snapshot(), 3)
|
||||
elseif did_warn then
|
||||
if eof then
|
||||
print(eof[2])
|
||||
@@ -922,9 +921,9 @@ between asynchronous (feed(), nvim_input()) and synchronous API calls.
|
||||
end
|
||||
|
||||
if flags.intermediate and not intermediate_seen then
|
||||
busted.fail('Expected intermediate screen state before final screen state', 3)
|
||||
error('Expected intermediate screen state before final screen state', 3)
|
||||
elseif flags.unchanged and intermediate_seen then
|
||||
busted.fail(
|
||||
error(
|
||||
'Expected screen state to be unchanged.\nIntermediate screen state:\n'
|
||||
.. intermediate_state_snapshot,
|
||||
3
|
||||
|
||||
Reference in New Issue
Block a user