fix(ci): use proper deep compare
This commit is contained in:
parent
9b6df85e9e
commit
1049e60736
2 changed files with 8 additions and 4 deletions
|
|
@ -97,8 +97,9 @@ function M.parse_git_diff(diff_output)
|
||||||
table.insert(all_highlights, highlight)
|
table.insert(all_highlights, highlight)
|
||||||
end
|
end
|
||||||
elseif not line:match('^%-') and not line:match('^\\') then -- Skip removed lines and "\ No newline" messages
|
elseif not line:match('^%-') and not line:match('^\\') then -- Skip removed lines and "\ No newline" messages
|
||||||
-- Unchanged line
|
-- Unchanged line - remove leading space if present
|
||||||
local parsed_line, line_highlights = parse_diff_line(line)
|
local clean_line = line:match('^%s') and line:sub(2) or line
|
||||||
|
local parsed_line, line_highlights = parse_diff_line(clean_line)
|
||||||
table.insert(content_lines, parsed_line)
|
table.insert(content_lines, parsed_line)
|
||||||
|
|
||||||
-- Set line numbers for any highlights (shouldn't be any for unchanged lines)
|
-- Set line numbers for any highlights (shouldn't be any for unchanged lines)
|
||||||
|
|
|
||||||
|
|
@ -100,8 +100,11 @@ index 1234567..abcdefg 100644
|
||||||
|
|
||||||
highlight.apply_highlights(1, highlights, 100)
|
highlight.apply_highlights(1, highlights, 100)
|
||||||
|
|
||||||
local call_args = mock_extmark.calls[1].vals
|
assert.stub(mock_extmark).was_called_with(1, 100, 0, 0, {
|
||||||
assert.equals('CpDiffAdded', call_args[4].hl_group)
|
end_col = 5,
|
||||||
|
hl_group = 'CpDiffAdded',
|
||||||
|
priority = 100,
|
||||||
|
})
|
||||||
mock_extmark:revert()
|
mock_extmark:revert()
|
||||||
mock_clear:revert()
|
mock_clear:revert()
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue