summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_visual.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-30 19:32:53 +0200
committerBram Moolenaar <Bram@vim.org>2020-03-30 19:32:53 +0200
commitca68ae13114619df3e4c195b41ad0575516f5ff6 (patch)
tree9022b7f5f1c8bb1ab22660530244414e9b6cdd99 /src/testdir/test_visual.vim
parent7d333a900d260b8e8caa0fb159c85023fc8795bd (diff)
patch 8.2.0482: channel and sandbox code not sufficiently testedv8.2.0482
Problem: Channel and sandbox code not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes #5855)
Diffstat (limited to 'src/testdir/test_visual.vim')
-rw-r--r--src/testdir/test_visual.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim
index ff4f76096a..143b140bae 100644
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -267,6 +267,15 @@ func Test_virtual_replace2()
call assert_equal(['abcd',
\ 'efgh',
\ 'ijkl'], getline(1, '$'))
+
+ " Test for truncating spaces in a newly added line using 'autoindent' if
+ " characters are not added to that line.
+ %d_
+ call setline(1, [' app', ' bee', ' cat'])
+ setlocal autoindent
+ exe "normal gg$gRt\n\nr"
+ call assert_equal([' apt', '', ' rat'], getline(1, '$'))
+
" clean up
%d_
set bs&vim