aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_edit.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-15 10:11:41 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-15 10:50:21 +0800
commit465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b (patch)
treed57568b30353002faa5e923ca0ffb8ea434797fc /src/nvim/testdir/test_edit.vim
parentc821b5c6955e6e15039298d50641608168159c01 (diff)
downloadrneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.tar.gz
rneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.tar.bz2
rneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.zip
vim-patch:8.2.0482: channel and sandbox code not sufficiently tested
Problem: Channel and sandbox code not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5855) https://github.com/vim/vim/commit/ca68ae13114619df3e4c195b41ad0575516f5ff6 Cherry-pick test_clientserver.vim changes form patch 8.2.0448.
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
-rw-r--r--src/nvim/testdir/test_edit.vim23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim
index ed68bb0f73..65194f49dd 100644
--- a/src/nvim/testdir/test_edit.vim
+++ b/src/nvim/testdir/test_edit.vim
@@ -1671,8 +1671,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()
throw 'Skipped: Nvim does not support cpoptions flag "H"'
new
call setline(1, ' ')
@@ -1686,6 +1686,25 @@ 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
+
" Test for editing a directory
func Test_edit_is_a_directory()
CheckEnglish