mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
@@ -52,6 +52,7 @@ endfunction
|
||||
"
|
||||
|
||||
function SetUp()
|
||||
let g:gitgutter_diff_base = ''
|
||||
call system("git init ".s:test_repo.
|
||||
\ " && cd ".s:test_repo.
|
||||
\ " && cp ../.gitconfig .".
|
||||
@@ -280,6 +281,29 @@ function Test_saveas()
|
||||
endfunction
|
||||
|
||||
|
||||
function Test_file_mv()
|
||||
call system('git mv fixture.txt fixture_moved.txt')
|
||||
edit fixture_moved.txt
|
||||
normal ggo*
|
||||
call s:trigger_gitgutter()
|
||||
let expected = [{'lnum': 2, 'name': 'GitGutterLineAdded'}]
|
||||
call s:assert_signs(expected, 'fixture_moved.txt')
|
||||
|
||||
write
|
||||
call system('git add fixture_moved.txt && git commit -m "moved and edited"')
|
||||
GitGutterDisable
|
||||
GitGutterEnable
|
||||
let expected = []
|
||||
call s:assert_signs(expected, 'fixture_moved.txt')
|
||||
|
||||
GitGutterDisable
|
||||
let g:gitgutter_diff_base = 'HEAD^'
|
||||
GitGutterEnable
|
||||
let expected = [{'lnum': 2, 'name': 'GitGutterLineAdded'}]
|
||||
call s:assert_signs(expected, 'fixture_moved.txt')
|
||||
endfunction
|
||||
|
||||
|
||||
" FIXME: this test fails when it is the first (or only) test to be run
|
||||
function Test_follow_symlink()
|
||||
let tmp = 'symlink'
|
||||
|
||||
Reference in New Issue
Block a user