patch 9.1.0228: Two unrelated things are tested by a single test
Problem: Two unrelated things are tested by a single test.
Solution: Split it into two, restoring the old Test_brace_single_line().
Add missing cleanup to some tests.
(zeertzjq)
closes: #14323
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 3a7248f..14440fb 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4174,7 +4174,20 @@
norm! z9765405999999999999
endfunc
-" Test for { and } paragraph movements and Ctrl-B in buffer with a single line
+" Test for { and } paragraph movements in a single line
+func Test_brace_single_line()
+ new
+ call setline(1, ['foobar one two three'])
+ 1
+ norm! 0}
+
+ call assert_equal([0, 1, 20, 0], getpos('.'))
+ norm! {
+ call assert_equal([0, 1, 1, 0], getpos('.'))
+ bw!
+endfunc
+
+" Test for Ctrl-B/Ctrl-U in buffer with a single line
func Test_single_line_scroll()
CheckFeature textprop
@@ -4183,12 +4196,7 @@
let vt = 'virt_above'
call prop_type_add(vt, {'highlight': 'IncSearch'})
call prop_add(1, 0, {'type': vt, 'text': '---', 'text_align': 'above'})
- 1
- norm! 0}
-
- call assert_equal([0, 1, 20, 0], getpos('.'))
- norm! {
- call assert_equal([0, 1, 1, 0], getpos('.'))
+ call cursor(1, 1)
" Ctrl-B/Ctrl-U scroll up with hidden "above" virtual text.
set smoothscroll
@@ -4203,6 +4211,7 @@
set smoothscroll&
bw!
+ call prop_type_delete(vt)
endfunc
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index 788870f..d7a7907 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -738,6 +738,7 @@
let &mouse = save_mouse
let &term = save_term
let &ttymouse = save_ttymouse
+ bwipe!
endfunc
" this was dividing by zero
@@ -999,9 +1000,8 @@
endfunc
func Test_smoothscroll_page()
- set smoothscroll
-
- 10split | 40vsplit
+ call NewWindow(10, 40)
+ setlocal smoothscroll
call setline(1, 'abcde '->repeat(150))
exe "norm! \<C-F>"
@@ -1038,7 +1038,7 @@
exe "norm! \<C-U>"
call assert_equal(0, winsaveview().skipcol)
- set smoothscroll&
+ bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 7acc24d..2a996a1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 228,
+/**/
227,
/**/
226,