From 465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 15 Jul 2022 10:11:41 +0800 Subject: 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. --- src/nvim/testdir/test_edit.vim | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir/test_edit.vim') 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\" + call assert_equal("\ijklmnopqr", getline(1)) + set cpo+=L + set list + call setline(1, 'abcdefghijklmnopqr') + exe "normal 0gR\" + call assert_equal("\cdefghijklmnopqr", getline(1)) + set nolist + call setline(1, 'abcdefghijklmnopqr') + exe "normal 0gR\" + call assert_equal("\ijklmnopqr", getline(1)) + set cpo-=L + %bw! +endfunc + " Test for editing a directory func Test_edit_is_a_directory() CheckEnglish -- cgit