mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.769
Problem: Behavior of :diffoff is not tested.
Solution: Add a bit of testing. (Olaf Dabrunz)
2693ca21ce
This commit is contained in:
parent
32e33aabdf
commit
81ccfc576f
@ -1,5 +1,7 @@
|
|||||||
Tests for vertical splits and filler lines in diff mode
|
Tests for vertical splits and filler lines in diff mode
|
||||||
|
|
||||||
|
Also tests restoration of saved options by :diffoff.
|
||||||
|
|
||||||
STARTTEST
|
STARTTEST
|
||||||
:so small.vim
|
:so small.vim
|
||||||
:" Disable the title to avoid xterm keeping the wrong one.
|
:" Disable the title to avoid xterm keeping the wrong one.
|
||||||
@ -10,8 +12,15 @@ pkdd:w! Xtest
|
|||||||
ddGpkkrXoxxx:w! Xtest2
|
ddGpkkrXoxxx:w! Xtest2
|
||||||
:file Nop
|
:file Nop
|
||||||
ggoyyyjjjozzzz
|
ggoyyyjjjozzzz
|
||||||
|
:set foldmethod=marker foldcolumn=4
|
||||||
|
:redir => nodiffsettings
|
||||||
|
:silent! :set diff? fdm? fdc? scb? crb? wrap?
|
||||||
|
:redir END
|
||||||
:vert diffsplit Xtest
|
:vert diffsplit Xtest
|
||||||
:vert diffsplit Xtest2
|
:vert diffsplit Xtest2
|
||||||
|
:redir => diffsettings
|
||||||
|
:silent! :set diff? fdm? fdc? scb? crb? wrap?
|
||||||
|
:redir END
|
||||||
:" jump to second window for a moment to have filler line appear at start of
|
:" jump to second window for a moment to have filler line appear at start of
|
||||||
:" first window
|
:" first window
|
||||||
ggpgg:let one = winline()
|
ggpgg:let one = winline()
|
||||||
@ -36,8 +45,30 @@ j:let three = three . "-" . winline()
|
|||||||
:call append("$", two)
|
:call append("$", two)
|
||||||
:call append("$", three)
|
:call append("$", three)
|
||||||
:$-2,$w! test.out
|
:$-2,$w! test.out
|
||||||
:" Test that diffing shows correct filler lines
|
:"
|
||||||
|
:" Test diffoff
|
||||||
:diffoff!
|
:diffoff!
|
||||||
|
:$put =nodiffsettings
|
||||||
|
:$put =diffsettings
|
||||||
|
1
|
||||||
|
:redir => nd1
|
||||||
|
:silent! :set diff? fdm? fdc? scb? crb? wrap?
|
||||||
|
:redir END
|
||||||
|
|
||||||
|
:redir => nd2
|
||||||
|
:silent! :set diff? fdm? fdc? scb? crb? wrap?
|
||||||
|
:redir END
|
||||||
|
|
||||||
|
:redir => nd3
|
||||||
|
:silent! :set diff? fdm? fdc? scb? crb? wrap?
|
||||||
|
:redir END
|
||||||
|
|
||||||
|
:$put =nd1
|
||||||
|
:$put =nd2
|
||||||
|
:$put =nd3
|
||||||
|
:$-39,$w >> test.out
|
||||||
|
:"
|
||||||
|
:" Test that diffing shows correct filler lines
|
||||||
:windo :bw!
|
:windo :bw!
|
||||||
:enew
|
:enew
|
||||||
:put =range(4,10)
|
:put =range(4,10)
|
||||||
@ -51,7 +82,7 @@ j:let three = three . "-" . winline()
|
|||||||
:enew
|
:enew
|
||||||
:put =w0
|
:put =w0
|
||||||
:.w >> test.out
|
:.w >> test.out
|
||||||
:unlet! one two three w0
|
:unlet! one two three nodiffsettings diffsettings nd1 nd2 nd3 w0
|
||||||
:qa!
|
:qa!
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
|
@ -1,4 +1,44 @@
|
|||||||
2-4-5-6-8-9
|
2-4-5-6-8-9
|
||||||
1-2-4-5-8
|
1-2-4-5-8
|
||||||
2-3-4-5-6-7-8
|
2-3-4-5-6-7-8
|
||||||
|
|
||||||
|
|
||||||
|
nodiff
|
||||||
|
foldmethod=marker
|
||||||
|
foldcolumn=4
|
||||||
|
noscrollbind
|
||||||
|
nocursorbind
|
||||||
|
wrap
|
||||||
|
|
||||||
|
|
||||||
|
diff
|
||||||
|
foldmethod=diff
|
||||||
|
foldcolumn=2
|
||||||
|
scrollbind
|
||||||
|
cursorbind
|
||||||
|
nowrap
|
||||||
|
|
||||||
|
|
||||||
|
nodiff
|
||||||
|
foldmethod=marker
|
||||||
|
foldcolumn=4
|
||||||
|
noscrollbind
|
||||||
|
nocursorbind
|
||||||
|
wrap
|
||||||
|
|
||||||
|
|
||||||
|
nodiff
|
||||||
|
foldmethod=marker
|
||||||
|
foldcolumn=4
|
||||||
|
noscrollbind
|
||||||
|
nocursorbind
|
||||||
|
wrap
|
||||||
|
|
||||||
|
|
||||||
|
nodiff
|
||||||
|
foldmethod=marker
|
||||||
|
foldcolumn=4
|
||||||
|
noscrollbind
|
||||||
|
nocursorbind
|
||||||
|
wrap
|
||||||
1
|
1
|
||||||
|
@ -365,7 +365,7 @@ static int included_patches[] = {
|
|||||||
// 772 NA
|
// 772 NA
|
||||||
// 771,
|
// 771,
|
||||||
// 770 NA
|
// 770 NA
|
||||||
// 769,
|
769,
|
||||||
768,
|
768,
|
||||||
// 767,
|
// 767,
|
||||||
// 766 NA
|
// 766 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user