Patch 9.0.0043
Problem: Insufficient testing for bracket commands.
Solution: Add a few more tests. (closes #10668)
Files: src/testdir/test_normal.vim
*** ../vim-9.0.0042/src/testdir/test_normal.vim 2022-07-02 16:29:15.031193541 +0100
--- src/testdir/test_normal.vim 2022-07-06 12:55:23.458946640 +0100
***************
*** 1994,2002 ****
call assert_equal(5, line('.'))
call assert_equal(3, col('.'))
! " No mark after line 21, cursor moves to first non blank on current line
21
! norm! $]'
call assert_equal(' 21 b', getline('.'))
call assert_equal(21, line('.'))
call assert_equal(3, col('.'))
--- 1994,2009 ----
call assert_equal(5, line('.'))
call assert_equal(3, col('.'))
! " No mark before line 1, cursor moves to first non-blank on current line
! 1
! norm! 5|['
! call assert_equal(' 1 b', getline('.'))
! call assert_equal(1, line('.'))
! call assert_equal(3, col('.'))
!
! " No mark after line 21, cursor moves to first non-blank on current line
21
! norm! 5|]'
call assert_equal(' 21 b', getline('.'))
call assert_equal(21, line('.'))
call assert_equal(3, col('.'))
***************
*** 2012,2017 ****
--- 2019,2052 ----
call assert_equal(' 20 b', getline('.'))
call assert_equal(20, line('.'))
call assert_equal(8, col('.'))
+
+ " No mark before line 1, cursor does not move
+ 1
+ norm! 5|[`
+ call assert_equal(' 1 b', getline('.'))
+ call assert_equal(1, line('.'))
+ call assert_equal(5, col('.'))
+
+ " No mark after line 21, cursor does not move
+ 21
+ norm! 5|]`
+ call assert_equal(' 21 b', getline('.'))
+ call assert_equal(21, line('.'))
+ call assert_equal(5, col('.'))
+
+ " Count too large for [`
+ " cursor moves to first lowercase mark
+ norm! 99[`
+ call assert_equal(' 1 b', getline('.'))
+ call assert_equal(1, line('.'))
+ call assert_equal(7, col('.'))
+
+ " Count too large for ]`
+ " cursor moves to last lowercase mark
+ norm! 99]`
+ call assert_equal(' 20 b', getline('.'))
+ call assert_equal(20, line('.'))
+ call assert_equal(8, col('.'))
" clean up
bw!
*** ../vim-9.0.0042/src/version.c 2022-07-05 21:56:36.157190166 +0100
--- src/version.c 2022-07-06 12:56:48.327754249 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 43,
/**/
--
hundred-and-one symptoms of being an internet addict:
58. You turn on your computer and turn off your wife.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///