forked from aniani/vim
patch 9.0.0360: crash when invalid line number on :for is ignored
Problem: Crash when invalid line number on :for is ignored. Solution: Do not check breakpoint for non-existing line.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
" Tests for various eval things.
|
||||
|
||||
source view_util.vim
|
||||
source shared.vim
|
||||
|
||||
function s:foo() abort
|
||||
try
|
||||
@@ -87,6 +88,18 @@ func Test_for_over_null_string()
|
||||
let &enc = save_enc
|
||||
endfunc
|
||||
|
||||
func Test_for_invalid_line_count()
|
||||
let lines =<< trim END
|
||||
111111111111111111111111 for line in ['one']
|
||||
endfor
|
||||
END
|
||||
call writefile(lines, 'XinvalidFor')
|
||||
" only test that this doesn't crash
|
||||
call RunVim([], [], '-u NONE -e -s -S XinvalidFor -c qa')
|
||||
|
||||
call delete('XinvalidFor')
|
||||
endfunc
|
||||
|
||||
func Test_readfile_binary()
|
||||
new
|
||||
call setline(1, ['one', 'two', 'three'])
|
||||
|
||||
Reference in New Issue
Block a user