1
0
forked from aniani/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 #5855)
This commit is contained in:
Bram Moolenaar
2020-03-30 19:32:53 +02:00
parent 7d333a900d
commit ca68ae1311
15 changed files with 488 additions and 31 deletions

View File

@@ -2,6 +2,7 @@
source shared.vim
source check.vim
source view_util.vim
func Setup_NewWindow()
10new
@@ -2941,6 +2942,28 @@ func Test_normal_cpo_minus()
close!
endfunc
" Test for displaying dollar when changing text ('$' flag in 'cpoptions')
func Test_normal_cpo_dollar()
new
let g:Line = ''
func SaveFirstLine()
let g:Line = Screenline(1)
return ''
endfunc
inoremap <expr> <buffer> <F2> SaveFirstLine()
call test_override('redraw_flag', 1)
set cpo+=$
call setline(1, 'one two three')
redraw!
exe "normal c2w\<F2>vim"
call assert_equal('one tw$ three', g:Line)
call assert_equal('vim three', getline(1))
set cpo-=$
call test_override('ALL', 0)
delfunc SaveFirstLine
%bw!
endfunc
" Test for using : to run a multi-line Ex command in operator pending mode
func Test_normal_yank_with_excmd()
new