Add test for revert subsequent nearby hunk.

This commit is contained in:
Andy Stewart
2015-03-05 11:49:27 +01:00
parent 05030aa565
commit 1e97331587
3 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/test/fixture.txt b/test/fixture.txt
index f5c6aff..3fbde56 100644
--- a/test/fixture.txt
+++ b/test/fixture.txt
@@ -1,5 +1,8 @@
a
b
+x
+y
+z
c
d
e

View File

@@ -0,0 +1,6 @@
--- Signs ---
Signs for fixture.txt:
line=3 id=3000 name=GitGutterLineAdded
line=4 id=3001 name=GitGutterLineAdded
line=5 id=3002 name=GitGutterLineAdded

View File

@@ -0,0 +1,9 @@
source helper.vim
call Setup()
execute "normal! 2Gox\<CR>y\<CR>z"
normal 2jdd
normal k
execute 'GitGutterRevertHunk'
call DumpSigns('hunkRevertNearbySigns')
call DumpGitDiff('hunkRevertNearbyGitDiff')