diff options
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
-rw-r--r-- | src/nvim/testdir/test_edit.vim | 23 |
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 |