mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Add test for revert subsequent nearby hunk.
This commit is contained in:
13
test/hunkRevertNearbyGitDiff.expected
Normal file
13
test/hunkRevertNearbyGitDiff.expected
Normal 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
|
||||
6
test/hunkRevertNearbySigns.expected
Normal file
6
test/hunkRevertNearbySigns.expected
Normal 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
|
||||
9
test/testHunkRevertNearbyHunk.vim
Normal file
9
test/testHunkRevertNearbyHunk.vim
Normal 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')
|
||||
Reference in New Issue
Block a user