aboutsummaryrefslogtreecommitdiff
path: root/test/functional/preload.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
commitff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch)
tree729bbcb92231538fa61dab6c3d890b025484b7f5 /test/functional/preload.lua
parent376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff)
parent28c04948a1c887a1cc0cb64de79fa32631700466 (diff)
downloadrneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/preload.lua')
-rw-r--r--test/functional/preload.lua29
1 files changed, 2 insertions, 27 deletions
diff --git a/test/functional/preload.lua b/test/functional/preload.lua
index 49f1eff0da..e524ab34aa 100644
--- a/test/functional/preload.lua
+++ b/test/functional/preload.lua
@@ -1,12 +1,10 @@
-- Modules loaded here will NOT be cleared and reloaded by Busted.
-- Busted started doing this to help provide more isolation. See issue #62
-- for more information about this.
-local helpers = require('test.functional.helpers')(nil)
+local t = require('test.testutil')
require('test.functional.ui.screen')
-local busted = require('busted')
-local is_os = helpers.is_os
-if is_os('win') then
+if t.is_os('win') then
local ffi = require('ffi')
ffi.cdef [[
typedef int errno_t;
@@ -14,26 +12,3 @@ if is_os('win') then
]]
ffi.C._set_fmode(0x8000)
end
-
-local testid = (function()
- local id = 0
- return function()
- id = id + 1
- return id
- end
-end)()
-
--- Global before_each. https://github.com/Olivine-Labs/busted/issues/613
-local function before_each(_element, _parent)
- local id = ('T%d'):format(testid())
- _G._nvim_test_id = id
- return nil, true
-end
-busted.subscribe({ 'test', 'start' }, before_each, {
- -- Ensure our --helper is handled before --output (see busted/runner.lua).
- priority = 1,
- -- Don't generate a test-id for skipped tests. /shrug
- predicate = function(element, _, status)
- return not (element.descriptor == 'pending' or status == 'pending')
- end,
-})