mirror of
https://github.com/ilyakooo0/nvim-autopairs.git
synced 2024-10-05 20:19:17 +03:00
fix tests
This commit is contained in:
parent
38f08137d4
commit
e90e12c789
3
Makefile
3
Makefile
@ -1,2 +1,5 @@
|
||||
test:
|
||||
nvim --headless --noplugin -u tests/minimal.vim -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal.vim'}"
|
||||
|
||||
test-file:
|
||||
nvim --headless --noplugin -u tests/minimal.vim -c "lua require(\"plenary.busted\").run(\"$(FILE)\")"
|
||||
|
@ -165,6 +165,14 @@ cond.is_bracket_line = function()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
cond.inside_quote = function()
|
||||
return function(opts)
|
||||
log.debug('inside_quote')
|
||||
return utils.is_in_quotes(opts.text, opts.col - 1)
|
||||
end
|
||||
end
|
||||
|
||||
cond.not_inside_quote = function()
|
||||
return function(opts)
|
||||
log.debug('not_inside_quote')
|
||||
|
@ -57,7 +57,6 @@ local compare_text = function(linenr, text_after, name, cursor_add, end_cursor)
|
||||
linenr + #text_after - 1,
|
||||
true
|
||||
)
|
||||
log.debug(new_text)
|
||||
for i = 1, #text_after, 1 do
|
||||
local t = string.gsub(text_after[i], '%|', '')
|
||||
if
|
||||
@ -74,7 +73,6 @@ local compare_text = function(linenr, text_after, name, cursor_add, end_cursor)
|
||||
eq(row, linenr + i - 2, '\n\n cursor row error: ' .. name .. '\n')
|
||||
eq(col + 1, end_cursor, '\n\n end cursor column error : ' .. name .. '\n')
|
||||
else
|
||||
log.debug(p_after)
|
||||
eq(row, linenr + i - 2, '\n\n cursor row error: ' .. name .. '\n')
|
||||
p_after = p_after + cursor_add
|
||||
eq(col, math.max(p_after - 2,0), '\n\n cursor column error : ' .. name .. '\n')
|
||||
|
Loading…
Reference in New Issue
Block a user