mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 03:53:47 -05:00
Add tests.
This commit is contained in:
4
test/fileAddedToGit.expected
Normal file
4
test/fileAddedToGit.expected
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
--- Signs ---
|
||||||
|
Signs for fileAddedToGit.tmp:
|
||||||
|
line=1 id=3000 name=GitGutterLineAdded
|
||||||
12
test/testFileAddedToGit.vim
Normal file
12
test/testFileAddedToGit.vim
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
source helper.vim
|
||||||
|
|
||||||
|
let tmpfile = 'fileAddedToGit.tmp'
|
||||||
|
call system('touch '.tmpfile)
|
||||||
|
call system('git add '.tmpfile)
|
||||||
|
execute 'edit '.tmpfile
|
||||||
|
normal ihello
|
||||||
|
write
|
||||||
|
call DumpSigns('fileAddedToGit')
|
||||||
|
|
||||||
|
call system('git reset HEAD '.tmpfile)
|
||||||
|
call system('rm '.tmpfile)
|
||||||
6
test/testUntrackedFileOutsideRepo.vim
Normal file
6
test/testUntrackedFileOutsideRepo.vim
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
source helper.vim
|
||||||
|
|
||||||
|
let tmpfile = tempname()
|
||||||
|
call system('touch '.tmpfile)
|
||||||
|
edit tmpfile
|
||||||
|
call DumpSigns('untrackedFileOutsideRepo')
|
||||||
8
test/testUntrackedFileWithinRepo.vim
Normal file
8
test/testUntrackedFileWithinRepo.vim
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
source helper.vim
|
||||||
|
|
||||||
|
let tmpfile = 'untrackedFileWithinRepo.tmp'
|
||||||
|
call system('touch '.tmpfile)
|
||||||
|
edit tmpfile
|
||||||
|
call DumpSigns('untrackedFileWithinRepo')
|
||||||
|
|
||||||
|
call system('rm '.tmpfile)
|
||||||
2
test/untrackedFileOutsideRepo.expected
Normal file
2
test/untrackedFileOutsideRepo.expected
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
--- Signs ---
|
||||||
2
test/untrackedFileWithinRepo.expected
Normal file
2
test/untrackedFileWithinRepo.expected
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
--- Signs ---
|
||||||
Reference in New Issue
Block a user