39 lines
1.1 KiB
Lua
39 lines
1.1 KiB
Lua
describe('cp.highlight', function()
|
|
local highlight = require('cp.highlight')
|
|
|
|
describe('parse_diff_line', function()
|
|
it('parses added text markers {+text+}')
|
|
it('removes removed text markers [-text-]')
|
|
it('handles mixed add/remove markers')
|
|
it('calculates correct highlight positions')
|
|
it('handles text without markers')
|
|
it('handles empty text')
|
|
end)
|
|
|
|
describe('parse_git_diff', function()
|
|
it('skips git diff headers')
|
|
it('processes added lines')
|
|
it('ignores removed lines')
|
|
it('handles unchanged lines')
|
|
it('sets correct line numbers')
|
|
it('handles empty diff output')
|
|
end)
|
|
|
|
describe('apply_highlights', function()
|
|
it('clears existing highlights')
|
|
it('applies extmarks with correct positions')
|
|
it('uses correct highlight groups')
|
|
it('handles empty highlights')
|
|
end)
|
|
|
|
describe('create_namespace', function()
|
|
it('creates unique namespace')
|
|
end)
|
|
|
|
describe('parse_and_apply_diff', function()
|
|
it('parses diff and applies to buffer')
|
|
it('sets buffer content')
|
|
it('applies highlights')
|
|
it('returns content lines')
|
|
end)
|
|
end)
|