summaryrefslogtreecommitdiff
path: root/src/testdir/test_edit.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_edit.vim
parent7d333a900d260b8e8caa0fb159c85023fc8795bd (diff)
downloadvim-git-ca68ae13114619df3e4c195b41ad0575516f5ff6.tar.gz
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_edit.vim')
-rw-r--r--src/testdir/test_edit.vim23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index 32fc92ddb..9096fcdeb 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1542,8 +1542,8 @@ func Test_edit_ctrl_o_invalid_cmd()
close!
endfunc
-" Test for inserting text at the beginning of a line
-func Test_insert_before_first_nonblank()
+" Test for inserting text in a line with only spaces ('H' flag in 'cpoptions')
+func Test_edit_cpo_H()
new
call setline(1, ' ')
normal! Ia
@@ -1556,4 +1556,23 @@ func Test_insert_before_first_nonblank()
close!
endfunc
+" Test for inserting tab in virtual replace mode ('L' flag in 'cpoptions')
+func Test_edit_cpo_L()
+ new
+ call setline(1, 'abcdefghijklmnopqr')
+ exe "normal 0gR\<Tab>"
+ call assert_equal("\<Tab>ijklmnopqr", getline(1))
+ set cpo+=L
+ set list
+ call setline(1, 'abcdefghijklmnopqr')
+ exe "normal 0gR\<Tab>"
+ call assert_equal("\<Tab>cdefghijklmnopqr", getline(1))
+ set nolist
+ call setline(1, 'abcdefghijklmnopqr')
+ exe "normal 0gR\<Tab>"
+ call assert_equal("\<Tab>ijklmnopqr", getline(1))
+ set cpo-=L
+ %bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab