Skip to content

Commit c67822c

Browse files
abeldekatechasnovski
authored andcommitted
test(extra): fix test failing conditionally on mini's local path
Details: - When mini.nvim is checked out locally to for example '~/projects/fix_mini', test 'oldfiles-respect local_opts.preserve_order' fails because search key 'x' is now present in all items - Function `validate_spawn_log` is unused and has been removed
1 parent 4182d64 commit c67822c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/test_extra.lua

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,6 @@ local get_spawn_log = function() return child.lua_get('_G.spawn_log') end
176176

177177
local clear_spawn_log = function() child.lua('_G.spawn_log = {}') end
178178

179-
local validate_spawn_log = function(ref, index)
180-
local present = get_spawn_log()
181-
if type(index) == 'number' then present = present[index] end
182-
eq(present, ref)
183-
end
184-
185179
local get_process_log = function() return child.lua_get('_G.process_log') end
186180

187181
local clear_process_log = function() child.lua('_G.process_log = {}') end
@@ -3536,12 +3530,14 @@ end
35363530

35373531
T['pickers']['oldfiles()']['respects `local_opts.preserve_order`'] = function()
35383532
child.lua('vim.fn.filereadable = function() return 1 end')
3539-
child.v.oldfiles = { 'axay', 'b', 'aaxy', 'ccc', 'xaa' }
3533+
local p = function(x) return full_path(make_testpath(x)) end
3534+
3535+
child.v.oldfiles = { p('auav'), p('b'), p('aauv'), p('ccc'), p('uaa') }
35403536
pick_oldfiles({ preserve_order = true })
35413537

3542-
type_keys('x')
3538+
type_keys('u')
35433539
eq(get_picker_matches().all_inds, { 1, 3, 5 })
3544-
type_keys('y')
3540+
type_keys('v')
35453541
eq(get_picker_matches().all_inds, { 1, 3 })
35463542
end
35473543

0 commit comments

Comments
 (0)