diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
commit | c324271b99eee4c621463f368914d57cd729bd9c (patch) | |
tree | 5d979d333a2d5f9c080991d5482fd5916f8579c6 /test/functional/preload.lua | |
parent | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (diff) | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
download | rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.gz rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.bz2 rneovim-c324271b99eee4c621463f368914d57cd729bd9c.zip |
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'test/functional/preload.lua')
-rw-r--r-- | test/functional/preload.lua | 26 |
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, +}) |