Mercurial > vim
diff src/testdir/test_edit.vim @ 19852:12518b40c161 v8.2.0482
patch 8.2.0482: channel and sandbox code not sufficiently tested
Commit: https://github.com/vim/vim/commit/ca68ae13114619df3e4c195b41ad0575516f5ff6
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 30 19:32:53 2020 +0200
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 https://github.com/vim/vim/issues/5855)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 30 Mar 2020 19:45:05 +0200 |
parents | 0208534b8a84 |
children | 252d2bb90394 |
line wrap: on
line diff
--- 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