Fix non-empty suffix condition

This commit is contained in:
Andy Stewart
2019-09-23 13:19:49 +01:00
parent f980fab55c
commit ae9edf0602
2 changed files with 7 additions and 2 deletions

View File

@@ -947,6 +947,11 @@ function Test_diff_highlight()
call assert_equal([], gitgutter#diff_highlight#process(['+foo']))
call assert_equal([], gitgutter#diff_highlight#process(['-foo','-bar','+baz']))
" everything changed
let hunk = ['-foo', '+cat']
let expected = []
call assert_equal(expected, gitgutter#diff_highlight#process(hunk))
" change in middle
let hunk = ['-foo bar baz', '+foo (bar) baz']
let expected = [[1, '-', 6, 8], [2, '+', 6, 10]]