mirror of
https://github.com/HiPhish/rainbow-delimiters.nvim.git
synced 2024-09-16 14:24:05 +02:00
Add test for for bug in Neovim 0.10
The test gets skipped for now because we know it to be broken. It need to be enabled when the bug gets fixed.
This commit is contained in:
parent
7997a464d7
commit
97b8238fb6
2 changed files with 22 additions and 1 deletions
3
.busted
3
.busted
|
@ -26,7 +26,8 @@
|
|||
return {
|
||||
_all = {
|
||||
coverage = false,
|
||||
lua = './test/nvim-shim'
|
||||
lua = './test/nvim-shim',
|
||||
['exclude-tags'] = {'skip'},
|
||||
},
|
||||
default = {
|
||||
verbose = true,
|
||||
|
|
|
@ -103,4 +103,24 @@ return foo]]
|
|||
assert.nvim(nvim).has_extmarks_at(2, 11, 'lua')
|
||||
assert.nvim(nvim).has_extmarks_at(3, 11, 'lua')
|
||||
end)
|
||||
|
||||
it('Preserves nested highlighting when entering insert mode #skip', function()
|
||||
-- This is broken on Neovim 0.10+, so we skip it for the time being.
|
||||
-- See https://github.com/HiPhish/rainbow-delimiters.nvim/pull/121
|
||||
|
||||
local content = [[local tmp = {
|
||||
[1] = { 1 },
|
||||
[2] = {
|
||||
a = print(),
|
||||
},
|
||||
}]]
|
||||
nvim:buf_set_lines(0, 0, -1, true, vim.fn.split(content, '\n'))
|
||||
nvim:buf_set_option(0, 'filetype', 'lua')
|
||||
-- Make a change inside the parentheses
|
||||
nvim:win_set_cursor(0, {4, 11})
|
||||
nvim:feedkeys(rtc'a <esc>', '', false)
|
||||
|
||||
local hl_group = require('rainbow-delimiters.config').highlight[3]
|
||||
assert.nvim(nvim).has_extmarks_at(3, 11, 'lua', hl_group)
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue