aboutsummaryrefslogtreecommitdiff
path: root/test/functional/preload.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-03-09 15:00:41 -0700
committerJosh Rahm <joshuarahm@gmail.com>2024-03-09 15:00:41 -0700
commit7a7f497b483cd65e340064f23ed1c73425ecba0a (patch)
treed5c99ea22a1e10300d06165f8ac96df6b0dc59e1 /test/functional/preload.lua
parent1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (diff)
parentade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff)
downloadrneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.gz
rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.bz2
rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpost
Diffstat (limited to 'test/functional/preload.lua')
-rw-r--r--test/functional/preload.lua26
1 files changed, 12 insertions, 14 deletions
diff --git a/test/functional/preload.lua b/test/functional/preload.lua
index 6a5a2e907e..49f1eff0da 100644
--- a/test/functional/preload.lua
+++ b/test/functional/preload.lua
@@ -3,12 +3,12 @@
-- for more information about this.
local helpers = require('test.functional.helpers')(nil)
require('test.functional.ui.screen')
-local busted = require("busted")
+local busted = require('busted')
local is_os = helpers.is_os
if is_os('win') then
local ffi = require('ffi')
- ffi.cdef[[
+ ffi.cdef [[
typedef int errno_t;
errno_t _set_fmode(int mode);
]]
@@ -17,10 +17,10 @@ end
local testid = (function()
local id = 0
- return (function()
+ return function()
id = id + 1
return id
- end)
+ end
end)()
-- Global before_each. https://github.com/Olivine-Labs/busted/issues/613
@@ -29,13 +29,11 @@ local function before_each(_element, _parent)
_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
- })
+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,
+})