mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4611: typos in tests; one lua line not covered by test
Problem: Typos in tests; one lua line not covered by test. Solution: Fix typos. Add test case. (Dominique Pellé, closes #9994)
This commit is contained in:
committed by
Bram Moolenaar
parent
fe154990c1
commit
81b573d7e5
@@ -731,7 +731,7 @@ func Test_breakindent20_list()
|
|||||||
\ "shall make no law ",
|
\ "shall make no law ",
|
||||||
\ ]
|
\ ]
|
||||||
call s:compare_lines(expect, lines)
|
call s:compare_lines(expect, lines)
|
||||||
" set mininum indent
|
" set minimum indent
|
||||||
setl briopt=min:5
|
setl briopt=min:5
|
||||||
redraw!
|
redraw!
|
||||||
let lines = s:screen_lines2(1, 6, 20)
|
let lines = s:screen_lines2(1, 6, 20)
|
||||||
|
@@ -172,7 +172,7 @@ func Test_uncrypt_xchacha20_2()
|
|||||||
call assert_equal(range(1, 4000)->map( {_, v -> string(v)}), getline(1,'$'))
|
call assert_equal(range(1, 4000)->map( {_, v -> string(v)}), getline(1,'$'))
|
||||||
set key=
|
set key=
|
||||||
w! ++ff=unix
|
w! ++ff=unix
|
||||||
" enryption removed (on MS-Windows the .* matches [unix])
|
" encryption removed (on MS-Windows the .* matches [unix])
|
||||||
call assert_match('"Xcrypt_sodium.txt".*4000L, 18893B written', execute(':message'))
|
call assert_match('"Xcrypt_sodium.txt".*4000L, 18893B written', execute(':message'))
|
||||||
bw!
|
bw!
|
||||||
call delete('Xcrypt_sodium.txt')
|
call delete('Xcrypt_sodium.txt')
|
||||||
|
@@ -162,7 +162,7 @@ func Test_cursorline_screenline()
|
|||||||
call term_sendkeys(buf, "gj")
|
call term_sendkeys(buf, "gj")
|
||||||
call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
|
call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
|
||||||
if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent")
|
if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent")
|
||||||
" test with set foldcolumn signcoloumn and breakindent
|
" test with set foldcolumn signcolumn and breakindent
|
||||||
call term_sendkeys(buf, "gg0")
|
call term_sendkeys(buf, "gg0")
|
||||||
call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>")
|
call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>")
|
||||||
call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
|
call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
|
||||||
|
@@ -51,7 +51,7 @@ func Test_digraphs()
|
|||||||
call Put_Dig("'e")
|
call Put_Dig("'e")
|
||||||
call Put_Dig("b'") " not defined
|
call Put_Dig("b'") " not defined
|
||||||
call assert_equal(["á", "é", "'"], getline(line('.')-2,line('.')))
|
call assert_equal(["á", "é", "'"], getline(line('.')-2,line('.')))
|
||||||
" Cicumflex
|
" Circumflex
|
||||||
call Put_Dig("a>")
|
call Put_Dig("a>")
|
||||||
call Put_Dig(">e")
|
call Put_Dig(">e")
|
||||||
call Put_Dig("b>") " not defined
|
call Put_Dig("b>") " not defined
|
||||||
|
@@ -274,7 +274,7 @@ func Test_set_balloonexpr()
|
|||||||
" Multiline balloon using NL
|
" Multiline balloon using NL
|
||||||
new
|
new
|
||||||
func MyBalloonFuncForMultilineUsingNL()
|
func MyBalloonFuncForMultilineUsingNL()
|
||||||
return "Multiline\nSuppported\nBalloon\nusing NL"
|
return "Multiline\nSupported\nBalloon\nusing NL"
|
||||||
endfunc
|
endfunc
|
||||||
setl balloonexpr=MyBalloonFuncForMultilineUsingNL()
|
setl balloonexpr=MyBalloonFuncForMultilineUsingNL()
|
||||||
setl ballooneval
|
setl ballooneval
|
||||||
@@ -289,7 +289,7 @@ func Test_set_balloonexpr()
|
|||||||
" Multiline balloon using List
|
" Multiline balloon using List
|
||||||
new
|
new
|
||||||
func MyBalloonFuncForMultilineUsingList()
|
func MyBalloonFuncForMultilineUsingList()
|
||||||
return [ 'Multiline', 'Suppported', 'Balloon', 'using List' ]
|
return [ 'Multiline', 'Supported', 'Balloon', 'using List' ]
|
||||||
endfunc
|
endfunc
|
||||||
setl balloonexpr=MyBalloonFuncForMultilineUsingList()
|
setl balloonexpr=MyBalloonFuncForMultilineUsingList()
|
||||||
setl ballooneval
|
setl ballooneval
|
||||||
@@ -1453,25 +1453,25 @@ func Test_gui_findrepl()
|
|||||||
call test_gui_event('findrepl', args)
|
call test_gui_event('findrepl', args)
|
||||||
call assert_equal(['ONE TWO ONE', 'Twoo ONE TWO ONEo'], getline(1, '$'))
|
call assert_equal(['ONE TWO ONE', 'Twoo ONE TWO ONEo'], getline(1, '$'))
|
||||||
|
|
||||||
" Find next occurance of a string (in a find dialog)
|
" Find next occurrence of a string (in a find dialog)
|
||||||
call cursor(1, 11)
|
call cursor(1, 11)
|
||||||
let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 1}
|
let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 1}
|
||||||
call test_gui_event('findrepl', args)
|
call test_gui_event('findrepl', args)
|
||||||
call assert_equal([2, 10], [line('.'), col('.')])
|
call assert_equal([2, 10], [line('.'), col('.')])
|
||||||
|
|
||||||
" Find previous occurances of a string (in a find dialog)
|
" Find previous occurrences of a string (in a find dialog)
|
||||||
call cursor(1, 11)
|
call cursor(1, 11)
|
||||||
let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 0}
|
let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 0}
|
||||||
call test_gui_event('findrepl', args)
|
call test_gui_event('findrepl', args)
|
||||||
call assert_equal([1, 5], [line('.'), col('.')])
|
call assert_equal([1, 5], [line('.'), col('.')])
|
||||||
|
|
||||||
" Find next occurance of a string (in a replace dialog)
|
" Find next occurrence of a string (in a replace dialog)
|
||||||
call cursor(1, 1)
|
call cursor(1, 1)
|
||||||
let args = #{find_text: 'Twoo', repl_text: '', flags: 0x2, forward: 1}
|
let args = #{find_text: 'Twoo', repl_text: '', flags: 0x2, forward: 1}
|
||||||
call test_gui_event('findrepl', args)
|
call test_gui_event('findrepl', args)
|
||||||
call assert_equal([2, 1], [line('.'), col('.')])
|
call assert_equal([2, 1], [line('.'), col('.')])
|
||||||
|
|
||||||
" Replace only the next occurance of a string (once)
|
" Replace only the next occurrence of a string (once)
|
||||||
call cursor(1, 5)
|
call cursor(1, 5)
|
||||||
let args = #{find_text: 'TWO', repl_text: 'two', flags: 0x3, forward: 1}
|
let args = #{find_text: 'TWO', repl_text: 'two', flags: 0x3, forward: 1}
|
||||||
call test_gui_event('findrepl', args)
|
call test_gui_event('findrepl', args)
|
||||||
|
@@ -1208,11 +1208,21 @@ func Test_lua_debug()
|
|||||||
call WaitForAssert({-> assert_equal('42', term_getline(buf, 9))})
|
call WaitForAssert({-> assert_equal('42', term_getline(buf, 9))})
|
||||||
call WaitForAssert({-> assert_equal('lua_debug> ', term_getline(buf, 10))})
|
call WaitForAssert({-> assert_equal('lua_debug> ', term_getline(buf, 10))})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, "-\n")
|
||||||
|
call WaitForAssert({-> assert_equal("(debug command):1: unexpected symbol near '-'",
|
||||||
|
\ term_getline(buf, 9))})
|
||||||
|
call WaitForAssert({-> assert_equal('lua_debug> ', term_getline(buf, 10))})
|
||||||
|
|
||||||
call term_sendkeys(buf, "cont\n")
|
call term_sendkeys(buf, "cont\n")
|
||||||
call WaitForAssert({-> assert_match(' All$', term_getline(buf, 10))})
|
call WaitForAssert({-> assert_match(' All$', term_getline(buf, 10))})
|
||||||
|
|
||||||
|
" Entering an empty line also exits the debugger.
|
||||||
|
call term_sendkeys(buf, ":lua debug.debug()\n")
|
||||||
|
call WaitForAssert({-> assert_equal('lua_debug> ', term_getline(buf, 10))})
|
||||||
|
call term_sendkeys(buf, "\n")
|
||||||
|
call WaitForAssert({-> assert_match(' All$', term_getline(buf, 10))})
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('XtestLuaDebug.vim')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -799,7 +799,7 @@ func Test_matchstr_with_ze()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Check a pattern with a look beind crossing a line boundary
|
" Check a pattern with a look behind crossing a line boundary
|
||||||
func Test_lookbehind_across_line()
|
func Test_lookbehind_across_line()
|
||||||
new
|
new
|
||||||
call append(0, ['Behind:', 'asdfasd<yyy', 'xxstart1', 'asdfasd<yy',
|
call append(0, ['Behind:', 'asdfasd<yyy', 'xxstart1', 'asdfasd<yy',
|
||||||
|
@@ -99,8 +99,8 @@ func Test_signal_INT()
|
|||||||
call term_sendkeys(buf, ":while 1 | endwhile\n")
|
call term_sendkeys(buf, ":while 1 | endwhile\n")
|
||||||
call WaitForAssert({-> assert_equal(':while 1 | endwhile', term_getline(buf, 6))})
|
call WaitForAssert({-> assert_equal(':while 1 | endwhile', term_getline(buf, 6))})
|
||||||
exe 'silent !kill -s INT ' .. pid_vim
|
exe 'silent !kill -s INT ' .. pid_vim
|
||||||
call term_sendkeys(buf, ":call setline(1, 'INTERUPTED')\n")
|
call term_sendkeys(buf, ":call setline(1, 'INTERRUPTED')\n")
|
||||||
call WaitForAssert({-> assert_equal('INTERUPTED', term_getline(buf, 1))})
|
call WaitForAssert({-> assert_equal('INTERRUPTED', term_getline(buf, 1))})
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -417,7 +417,7 @@ func Test_spellsuggest_option_expr()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for 'spellsuggest' expr errrors
|
" Test for 'spellsuggest' expr errors
|
||||||
func Test_spellsuggest_expr_errors()
|
func Test_spellsuggest_expr_errors()
|
||||||
" 'spellsuggest'
|
" 'spellsuggest'
|
||||||
func MySuggest()
|
func MySuggest()
|
||||||
|
@@ -260,7 +260,7 @@ func Test_statusline()
|
|||||||
call assert_match('^vimLineComment\s*$', s:get_statusline())
|
call assert_match('^vimLineComment\s*$', s:get_statusline())
|
||||||
syntax off
|
syntax off
|
||||||
|
|
||||||
"%{%expr%}: evaluates enxpressions present in result of expr
|
"%{%expr%}: evaluates expressions present in result of expr
|
||||||
func! Inner_eval()
|
func! Inner_eval()
|
||||||
return '%n some other text'
|
return '%n some other text'
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -2004,7 +2004,7 @@ def s:FalsyOp()
|
|||||||
echo "" ?? "empty string"
|
echo "" ?? "empty string"
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_dsassemble_falsy_op()
|
def Test_disassemble_falsy_op()
|
||||||
var res = execute('disass s:FalsyOp')
|
var res = execute('disass s:FalsyOp')
|
||||||
assert_match('\<SNR>\d*_FalsyOp\_s*' ..
|
assert_match('\<SNR>\d*_FalsyOp\_s*' ..
|
||||||
'echo g:flag ?? "yes"\_s*' ..
|
'echo g:flag ?? "yes"\_s*' ..
|
||||||
|
@@ -563,7 +563,7 @@ let ablob = 0z01ab
|
|||||||
let alist = [2, 3, 4]
|
let alist = [2, 3, 4]
|
||||||
let adict = #{aaa: 2, bbb: 8}
|
let adict = #{aaa: 2, bbb: 8}
|
||||||
|
|
||||||
" test == comperator
|
" test == comparator
|
||||||
def Test_expr4_equal()
|
def Test_expr4_equal()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
var trueVar = true
|
var trueVar = true
|
||||||
@@ -902,7 +902,7 @@ def Test_expr4_wrong_type()
|
|||||||
'echo n < true'], 'E1072:', 2)
|
'echo n < true'], 'E1072:', 2)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test != comperator
|
" test != comparator
|
||||||
def Test_expr4_notequal()
|
def Test_expr4_notequal()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
var trueVar = true
|
var trueVar = true
|
||||||
@@ -987,7 +987,7 @@ def Test_expr4_notequal()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test > comperator
|
" test > comparator
|
||||||
def Test_expr4_greater()
|
def Test_expr4_greater()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
assert_true(2 > 0)
|
assert_true(2 > 0)
|
||||||
@@ -1013,7 +1013,7 @@ def Test_expr4_greater()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test >= comperator
|
" test >= comparator
|
||||||
def Test_expr4_greaterequal()
|
def Test_expr4_greaterequal()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
assert_true(2 >= 0)
|
assert_true(2 >= 0)
|
||||||
@@ -1034,7 +1034,7 @@ def Test_expr4_greaterequal()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test < comperator
|
" test < comparator
|
||||||
def Test_expr4_smaller()
|
def Test_expr4_smaller()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
assert_false(2 < 0)
|
assert_false(2 < 0)
|
||||||
@@ -1056,7 +1056,7 @@ def Test_expr4_smaller()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test <= comperator
|
" test <= comparator
|
||||||
def Test_expr4_smallerequal()
|
def Test_expr4_smallerequal()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
assert_false(2 <= 0)
|
assert_false(2 <= 0)
|
||||||
@@ -1081,7 +1081,7 @@ def Test_expr4_smallerequal()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test =~ comperator
|
" test =~ comparator
|
||||||
def Test_expr4_match()
|
def Test_expr4_match()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
assert_equal(false, '2' =~ '0')
|
assert_equal(false, '2' =~ '0')
|
||||||
@@ -1098,7 +1098,7 @@ def Test_expr4_match()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test !~ comperator
|
" test !~ comparator
|
||||||
def Test_expr4_nomatch()
|
def Test_expr4_nomatch()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
assert_equal(true, '2' !~ '0')
|
assert_equal(true, '2' !~ '0')
|
||||||
@@ -1110,7 +1110,7 @@ def Test_expr4_nomatch()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test is comperator
|
" test is comparator
|
||||||
def Test_expr4_is()
|
def Test_expr4_is()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
var mylist = [2]
|
var mylist = [2]
|
||||||
@@ -1128,7 +1128,7 @@ def Test_expr4_is()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test isnot comperator
|
" test isnot comparator
|
||||||
def Test_expr4_isnot()
|
def Test_expr4_isnot()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
var mylist = [2]
|
var mylist = [2]
|
||||||
|
@@ -3631,7 +3631,7 @@ endfunc
|
|||||||
" exceptions.
|
" exceptions.
|
||||||
"-------------------------------------------------------------------------------
|
"-------------------------------------------------------------------------------
|
||||||
|
|
||||||
func Test_execption_info_for_error()
|
func Test_exception_info_for_error()
|
||||||
CheckEnglish
|
CheckEnglish
|
||||||
|
|
||||||
let test =<< trim [CODE]
|
let test =<< trim [CODE]
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4611,
|
||||||
/**/
|
/**/
|
||||||
4610,
|
4610,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user