mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.0.1153: no tests for diff_hlID() and diff_filler()
Problem: No tests for diff_hlID() and diff_filler().
Solution: Add tests. (Dominique Pelle, closes vim/vim#2156)
97fbc404fc
This commit is contained in:
parent
11f03ee3f3
commit
1782550bfe
@ -672,6 +672,31 @@ func Test_diff_filler()
|
||||
%bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_diff_hlID()
|
||||
new
|
||||
call setline(1, [1, 2, 3])
|
||||
diffthis
|
||||
vnew
|
||||
call setline(1, ['1x', 2, 'x', 3])
|
||||
diffthis
|
||||
redraw
|
||||
|
||||
call assert_equal(synIDattr(diff_hlID(-1, 1), "name"), "")
|
||||
|
||||
call assert_equal(synIDattr(diff_hlID(1, 1), "name"), "DiffChange")
|
||||
call assert_equal(synIDattr(diff_hlID(1, 2), "name"), "DiffText")
|
||||
call assert_equal(synIDattr(diff_hlID(2, 1), "name"), "")
|
||||
call assert_equal(synIDattr(diff_hlID(3, 1), "name"), "DiffAdd")
|
||||
call assert_equal(synIDattr(diff_hlID(4, 1), "name"), "")
|
||||
|
||||
wincmd w
|
||||
call assert_equal(synIDattr(diff_hlID(1, 1), "name"), "DiffChange")
|
||||
call assert_equal(synIDattr(diff_hlID(2, 1), "name"), "")
|
||||
call assert_equal(synIDattr(diff_hlID(3, 1), "name"), "")
|
||||
|
||||
%bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_diff_lastline()
|
||||
enew!
|
||||
only!
|
||||
|
Loading…
Reference in New Issue
Block a user