fix(ci): use proper deep compare

This commit is contained in:
Barrett Ruth 2025-09-19 14:14:12 -04:00
parent 9b6df85e9e
commit 1049e60736
2 changed files with 8 additions and 4 deletions

View file

@ -97,8 +97,9 @@ function M.parse_git_diff(diff_output)
table.insert(all_highlights, highlight)
end
elseif not line:match('^%-') and not line:match('^\\') then -- Skip removed lines and "\ No newline" messages
-- Unchanged line
local parsed_line, line_highlights = parse_diff_line(line)
-- Unchanged line - remove leading space if present
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)
-- Set line numbers for any highlights (shouldn't be any for unchanged lines)

View file

@ -100,8 +100,11 @@ index 1234567..abcdefg 100644
highlight.apply_highlights(1, highlights, 100)
local call_args = mock_extmark.calls[1].vals
assert.equals('CpDiffAdded', call_args[4].hl_group)
assert.stub(mock_extmark).was_called_with(1, 100, 0, 0, {
end_col = 5,
hl_group = 'CpDiffAdded',
priority = 100,
})
mock_extmark:revert()
mock_clear:revert()
end)