mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -117,6 +117,16 @@ function Test_remove_first_lines()
|
||||
endfunction
|
||||
|
||||
|
||||
function Test_overlapping_hunks()
|
||||
execute '3d'
|
||||
execute '1d'
|
||||
call s:trigger_gitgutter()
|
||||
|
||||
let expected = ["line=1 id=3000 name=GitGutterLineRemovedAboveAndBelow"]
|
||||
call assert_equal(expected, s:signs('fixture.txt'))
|
||||
endfunction
|
||||
|
||||
|
||||
function Test_edit_file_with_same_name_as_a_branch()
|
||||
normal 5Gi*
|
||||
call system('git checkout -b fixture.txt')
|
||||
@ -445,6 +455,42 @@ function Test_undo_nearby_hunk()
|
||||
endfunction
|
||||
|
||||
|
||||
function Test_overlapping_hunk_op()
|
||||
func Answer(char)
|
||||
call feedkeys(a:char."\<CR>")
|
||||
endfunc
|
||||
|
||||
" Undo upper
|
||||
|
||||
execute '3d'
|
||||
execute '1d'
|
||||
call s:trigger_gitgutter()
|
||||
normal gg
|
||||
call timer_start(100, {-> Answer('u')} )
|
||||
GitGutterUndoHunk
|
||||
call s:trigger_gitgutter()
|
||||
|
||||
let expected = [
|
||||
\ 'line=2 id=3000 name=GitGutterLineRemoved',
|
||||
\ ]
|
||||
call assert_equal(expected, s:signs('fixture.txt'))
|
||||
|
||||
" Undo lower
|
||||
|
||||
execute '1d'
|
||||
call s:trigger_gitgutter()
|
||||
normal gg
|
||||
call timer_start(100, {-> Answer('l')} )
|
||||
GitGutterUndoHunk
|
||||
call s:trigger_gitgutter()
|
||||
|
||||
let expected = [
|
||||
\ 'line=1 id=3000 name=GitGutterLineRemovedFirstLine',
|
||||
\ ]
|
||||
call assert_equal(expected, s:signs('fixture.txt'))
|
||||
endfunction
|
||||
|
||||
|
||||
function Test_write_option()
|
||||
set nowrite
|
||||
|
||||
|
Reference in New Issue
Block a user