Skip to content

Commit bb05277

Browse files
committed
(mini.jump2d tests) Skip screenshot fold tests on Nightly.
Details: - Main reason is neovim/neovim#23831.
1 parent 1ca32b9 commit bb05277

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tests/test_jump2d.lua

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,11 @@ T['start()']['uses `spotter` with correct arguments'] = function()
496496
{ 1, { win_id = win_other, win_id_init = win_init } },
497497
-- Lines 2 and 3 are folded, shouldn't be called
498498
})
499-
child.expect_screenshot()
499+
500+
-- TODO: remove condition after Neovim issue is resolved
501+
-- Don't check on Neovim nightly because there is a crucial change
502+
-- Source: https://github.com/neovim/neovim/issues/23831
503+
if child.fn.has('nvim-0.10') == 0 then child.expect_screenshot() end
500504

501505
-- Should call `spotter` only on jumpt start, not on every step
502506
child.lua('_G.args_history = {}')
@@ -627,14 +631,16 @@ T['start()']['respects folds'] = function()
627631

628632
-- Validate
629633
start()
630-
child.expect_screenshot()
634+
-- TODO: remove condition after Neovim issue is resolved
635+
if child.fn.has('nvim-0.10') == 0 then child.expect_screenshot() end
631636

632637
-- Folds should still be present
633638
eq({ child.fn.foldclosed(2), child.fn.foldclosed(3) }, { 2, 2 })
634639

635640
-- After jump should open enough folds to show cursor
636641
type_keys('c')
637-
child.expect_screenshot()
642+
-- TODO: remove condition after Neovim issue is resolved
643+
if child.fn.has('nvim-0.10') == 0 then child.expect_screenshot() end
638644
eq(get_cursor(), { 2, 0 })
639645
eq({ child.fn.foldclosed(2), child.fn.foldclosed(3) }, { -1, -1 })
640646
end
@@ -654,7 +660,8 @@ T['start()']['respects `allowed_lines.fold`'] = function()
654660
child.lua('MiniJump2d.stop()')
655661
child.b.minijump2d_config = { allowed_lines = { fold = true } }
656662
start()
657-
child.expect_screenshot()
663+
-- TODO: remove condition after Neovim issue is resolved
664+
if child.fn.has('nvim-0.10') == 0 then child.expect_screenshot() end
658665
end
659666

660667
T['start()']['respects `allowed_windows`'] = new_set({

0 commit comments

Comments
 (0)