summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-07 10:33:20 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-07 10:33:20 +0000
commit6bf821e8abe1da24e5d0624f032d7eda745756e8 (patch)
tree8b1924cc93b0a66001aa3a1fd808969e5894e2cc
parent8cbf2499179db39a46e700ab04d0b36e22bcc1bb (diff)
patch 8.2.4315: put in Visual mode not fully testedv8.2.4315
Problem: Put in Visual mode not fully tested. Solution: Add a few more test cases. (closes #9708)
-rw-r--r--src/testdir/test_visual.vim46
-rw-r--r--src/version.c2
2 files changed, 42 insertions, 6 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim
index d336f5b38a..3fbd5c7e4e 100644
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -1369,18 +1369,52 @@ func Test_visual_paste()
call setline(1, ['xxxx'])
call setreg('"', 'foo')
call setreg('-', 'bar')
- normal 1Gvp
- call assert_equal(@", 'x')
- call assert_equal(@-, 'x')
+ normal gg0vp
+ call assert_equal('x', @")
+ call assert_equal('x', @-)
+ call assert_equal('fooxxx', getline(1))
+ normal $vp
+ call assert_equal('x', @")
+ call assert_equal('x', @-)
+ call assert_equal('fooxxx', getline(1))
+ " Test with a different register as unnamed register.
+ call setline(2, ['baz'])
+ normal 2gg0"rD
+ call assert_equal('baz', @")
+ normal gg0vp
+ call assert_equal('f', @")
+ call assert_equal('f', @-)
+ call assert_equal('bazooxxx', getline(1))
+ normal $vp
+ call assert_equal('x', @")
+ call assert_equal('x', @-)
+ call assert_equal('bazooxxf', getline(1))
if has('clipboard')
" v_P does not overwrite unnamed register.
call setline(1, ['xxxx'])
call setreg('"', 'foo')
call setreg('-', 'bar')
- normal 1GvP
- call assert_equal(@", 'foo')
- call assert_equal(@-, 'x')
+ normal gg0vP
+ call assert_equal('foo', @")
+ call assert_equal('x', @-)
+ call assert_equal('fooxxx', getline(1))
+ normal $vP
+ call assert_equal('foo', @")
+ call assert_equal('x', @-)
+ call assert_equal('fooxxfoo', getline(1))
+ " Test with a different register as unnamed register.
+ call setline(2, ['baz'])
+ normal 2gg0"rD
+ call assert_equal('baz', @")
+ normal gg0vP
+ call assert_equal('baz', @")
+ call assert_equal('f', @-)
+ call assert_equal('bazooxxfoo', getline(1))
+ normal $vP
+ call assert_equal('baz', @")
+ call assert_equal('o', @-)
+ call assert_equal('bazooxxfobaz', getline(1))
endif
bwipe!
diff --git a/src/version.c b/src/version.c
index a071c5f678..8d0dececd1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4315,
+/**/
4314,
/**/
4313,