• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revision23f44007f65dc6b7fe35c5ffbca6c2410f949ce7 (tree)
Zeit2022-07-06 21:00:05
AutorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 9.0.0043: insufficient testing for bracket commands

Commit: https://github.com/vim/vim/commit/cf34434b5e840dda4a21cd9c0bee24e3e43a674d
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed Jul 6 12:57:31 2022 +0100

patch 9.0.0043: insufficient testing for bracket commands
Problem: Insufficient testing for bracket commands.
Solution: Add a few more tests. (closes https://github.com/vim/vim/issues/10668)

Ändern Zusammenfassung

Diff

diff -r 627e04fe3459 -r 23f44007f65d src/testdir/test_normal.vim
--- a/src/testdir/test_normal.vim Tue Jul 05 23:00:04 2022 +0200
+++ b/src/testdir/test_normal.vim Wed Jul 06 14:00:05 2022 +0200
@@ -1994,9 +1994,16 @@
19941994 call assert_equal(5, line('.'))
19951995 call assert_equal(3, col('.'))
19961996
1997- " No mark after line 21, cursor moves to first non blank on current line
1997+ " No mark before line 1, cursor moves to first non-blank on current line
1998+ 1
1999+ norm! 5|['
2000+ call assert_equal(' 1 b', getline('.'))
2001+ call assert_equal(1, line('.'))
2002+ call assert_equal(3, col('.'))
2003+
2004+ " No mark after line 21, cursor moves to first non-blank on current line
19982005 21
1999- norm! $]'
2006+ norm! 5|]'
20002007 call assert_equal(' 21 b', getline('.'))
20012008 call assert_equal(21, line('.'))
20022009 call assert_equal(3, col('.'))
@@ -2013,6 +2020,34 @@
20132020 call assert_equal(20, line('.'))
20142021 call assert_equal(8, col('.'))
20152022
2023+ " No mark before line 1, cursor does not move
2024+ 1
2025+ norm! 5|[`
2026+ call assert_equal(' 1 b', getline('.'))
2027+ call assert_equal(1, line('.'))
2028+ call assert_equal(5, col('.'))
2029+
2030+ " No mark after line 21, cursor does not move
2031+ 21
2032+ norm! 5|]`
2033+ call assert_equal(' 21 b', getline('.'))
2034+ call assert_equal(21, line('.'))
2035+ call assert_equal(5, col('.'))
2036+
2037+ " Count too large for [`
2038+ " cursor moves to first lowercase mark
2039+ norm! 99[`
2040+ call assert_equal(' 1 b', getline('.'))
2041+ call assert_equal(1, line('.'))
2042+ call assert_equal(7, col('.'))
2043+
2044+ " Count too large for ]`
2045+ " cursor moves to last lowercase mark
2046+ norm! 99]`
2047+ call assert_equal(' 20 b', getline('.'))
2048+ call assert_equal(20, line('.'))
2049+ call assert_equal(8, col('.'))
2050+
20162051 " clean up
20172052 bw!
20182053 endfunc
diff -r 627e04fe3459 -r 23f44007f65d src/version.c
--- a/src/version.c Tue Jul 05 23:00:04 2022 +0200
+++ b/src/version.c Wed Jul 06 14:00:05 2022 +0200
@@ -736,6 +736,8 @@
736736 static int included_patches[] =
737737 { /* Add new patch number below this line */
738738 /**/
739+ 43,
740+/**/
739741 42,
740742 /**/
741743 41,
Show on old repository browser