File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,6 +162,43 @@ func Test_filler_lines()
162162 wincmd h
163163 call assert_equal (1 , line (' w0' ))
164164 unlet ! diff_fdm diff_fdc
165+ windo diffoff
166+ bwipe!
167+ enew !
168+ endfunc
165169
166- windo bw !
170+ func Test_diffget_diffput ()
171+ enew !
172+ let l = range (50 )
173+ call setline (1 , l )
174+ call assert_fails (' diffget' , ' E99:' )
175+ diffthis
176+ call assert_fails (' diffget' , ' E100:' )
177+ new
178+ let l [10 ] = ' one'
179+ let l [20 ] = ' two'
180+ let l [30 ] = ' three'
181+ let l [40 ] = ' four'
182+ call setline (1 , l )
183+ diffthis
184+ call assert_equal (' one' , getline (11 ))
185+ 11 diffget
186+ call assert_equal (' 10' , getline (11 ))
187+ 21 diffput
188+ wincmd w
189+ call assert_equal (' two' , getline (21 ))
190+ normal 31 Gdo
191+ call assert_equal (' three' , getline (31 ))
192+ call assert_equal (' 40' , getline (41 ))
193+ normal 41 Gdp
194+ wincmd w
195+ call assert_equal (' 40' , getline (41 ))
196+ new
197+ diffthis
198+ call assert_fails (' diffget' , ' E101:' )
199+
200+ windo diffoff
201+ bwipe!
202+ bwipe!
203+ enew !
167204endfunc
Original file line number Diff line number Diff line change @@ -763,6 +763,8 @@ static char *(features[]) =
763763
764764static int included_patches [] =
765765{ /* Add new patch number below this line */
766+ /**/
767+ 2126 ,
766768/**/
767769 2125 ,
768770/**/
You can’t perform that action at this time.
0 commit comments