Skip to content

Commit

Permalink
Add test for revert subsequent nearby hunk.
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Mar 5, 2015
1 parent 05030aa commit 1e97331
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/hunkRevertNearbyGitDiff.expected
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions test/hunkRevertNearbySigns.expected
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions test/testHunkRevertNearbyHunk.vim
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit 1e97331

Please sign in to comment.