blob: aaccf396ffcf4f832f62fa041c168344badc8464 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
set runtimepath+=../
source ../plugin/gitgutter.vim
function! Setup()
edit! fixture.txt
sign unplace *
endfunction
function! DumpSigns(filename)
execute 'redir! > ' a:filename.'.actual'
silent execute 'sign place'
redir END
endfunction
function! DumpGitDiff(filename)
call system('git diff fixture.txt > '.a:filename.'.actual')
endfunction
function! DumpGitDiffStaged(filename)
call system('git diff --staged fixture.txt > '.a:filename.'.actual')
endfunction
function! Dump(text, filename)
let msg = type(a:text) == 1 ? split(a:text, '\n') : a:text
call writefile(msg, a:filename.'.actual', 'a')
endfunction
|