mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -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 ",
|
||||
\ ]
|
||||
call s:compare_lines(expect, lines)
|
||||
" set mininum indent
|
||||
" set minimum indent
|
||||
setl briopt=min:5
|
||||
redraw!
|
||||
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,'$'))
|
||||
set key=
|
||||
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'))
|
||||
bw!
|
||||
call delete('Xcrypt_sodium.txt')
|
||||
|
@@ -162,7 +162,7 @@ func Test_cursorline_screenline()
|
||||
call term_sendkeys(buf, "gj")
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
|
||||
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, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
|
||||
|
@@ -51,7 +51,7 @@ func Test_digraphs()
|
||||
call Put_Dig("'e")
|
||||
call Put_Dig("b'") " not defined
|
||||
call assert_equal(["á", "é", "'"], getline(line('.')-2,line('.')))
|
||||
" Cicumflex
|
||||
" Circumflex
|
||||
call Put_Dig("a>")
|
||||
call Put_Dig(">e")
|
||||
call Put_Dig("b>") " not defined
|
||||
|
@@ -274,7 +274,7 @@ func Test_set_balloonexpr()
|
||||
" Multiline balloon using NL
|
||||
new
|
||||
func MyBalloonFuncForMultilineUsingNL()
|
||||
return "Multiline\nSuppported\nBalloon\nusing NL"
|
||||
return "Multiline\nSupported\nBalloon\nusing NL"
|
||||
endfunc
|
||||
setl balloonexpr=MyBalloonFuncForMultilineUsingNL()
|
||||
setl ballooneval
|
||||
@@ -289,7 +289,7 @@ func Test_set_balloonexpr()
|
||||
" Multiline balloon using List
|
||||
new
|
||||
func MyBalloonFuncForMultilineUsingList()
|
||||
return [ 'Multiline', 'Suppported', 'Balloon', 'using List' ]
|
||||
return [ 'Multiline', 'Supported', 'Balloon', 'using List' ]
|
||||
endfunc
|
||||
setl balloonexpr=MyBalloonFuncForMultilineUsingList()
|
||||
setl ballooneval
|
||||
@@ -1453,25 +1453,25 @@ func Test_gui_findrepl()
|
||||
call test_gui_event('findrepl', args)
|
||||
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)
|
||||
let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 1}
|
||||
call test_gui_event('findrepl', args)
|
||||
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)
|
||||
let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 0}
|
||||
call test_gui_event('findrepl', args)
|
||||
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)
|
||||
let args = #{find_text: 'Twoo', repl_text: '', flags: 0x2, forward: 1}
|
||||
call test_gui_event('findrepl', args)
|
||||
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)
|
||||
let args = #{find_text: 'TWO', repl_text: 'two', flags: 0x3, forward: 1}
|
||||
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('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 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 delete('XtestLuaDebug.vim')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
@@ -799,7 +799,7 @@ func Test_matchstr_with_ze()
|
||||
bwipe!
|
||||
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()
|
||||
new
|
||||
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 WaitForAssert({-> assert_equal(':while 1 | endwhile', term_getline(buf, 6))})
|
||||
exe 'silent !kill -s INT ' .. pid_vim
|
||||
call term_sendkeys(buf, ":call setline(1, 'INTERUPTED')\n")
|
||||
call WaitForAssert({-> assert_equal('INTERUPTED', term_getline(buf, 1))})
|
||||
call term_sendkeys(buf, ":call setline(1, 'INTERRUPTED')\n")
|
||||
call WaitForAssert({-> assert_equal('INTERRUPTED', term_getline(buf, 1))})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
@@ -417,7 +417,7 @@ func Test_spellsuggest_option_expr()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Test for 'spellsuggest' expr errrors
|
||||
" Test for 'spellsuggest' expr errors
|
||||
func Test_spellsuggest_expr_errors()
|
||||
" 'spellsuggest'
|
||||
func MySuggest()
|
||||
|
@@ -260,7 +260,7 @@ func Test_statusline()
|
||||
call assert_match('^vimLineComment\s*$', s:get_statusline())
|
||||
syntax off
|
||||
|
||||
"%{%expr%}: evaluates enxpressions present in result of expr
|
||||
"%{%expr%}: evaluates expressions present in result of expr
|
||||
func! Inner_eval()
|
||||
return '%n some other text'
|
||||
endfunc
|
||||
|
@@ -2004,7 +2004,7 @@ def s:FalsyOp()
|
||||
echo "" ?? "empty string"
|
||||
enddef
|
||||
|
||||
def Test_dsassemble_falsy_op()
|
||||
def Test_disassemble_falsy_op()
|
||||
var res = execute('disass s:FalsyOp')
|
||||
assert_match('\<SNR>\d*_FalsyOp\_s*' ..
|
||||
'echo g:flag ?? "yes"\_s*' ..
|
||||
|
@@ -563,7 +563,7 @@ let ablob = 0z01ab
|
||||
let alist = [2, 3, 4]
|
||||
let adict = #{aaa: 2, bbb: 8}
|
||||
|
||||
" test == comperator
|
||||
" test == comparator
|
||||
def Test_expr4_equal()
|
||||
var lines =<< trim END
|
||||
var trueVar = true
|
||||
@@ -902,7 +902,7 @@ def Test_expr4_wrong_type()
|
||||
'echo n < true'], 'E1072:', 2)
|
||||
enddef
|
||||
|
||||
" test != comperator
|
||||
" test != comparator
|
||||
def Test_expr4_notequal()
|
||||
var lines =<< trim END
|
||||
var trueVar = true
|
||||
@@ -987,7 +987,7 @@ def Test_expr4_notequal()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test > comperator
|
||||
" test > comparator
|
||||
def Test_expr4_greater()
|
||||
var lines =<< trim END
|
||||
assert_true(2 > 0)
|
||||
@@ -1013,7 +1013,7 @@ def Test_expr4_greater()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test >= comperator
|
||||
" test >= comparator
|
||||
def Test_expr4_greaterequal()
|
||||
var lines =<< trim END
|
||||
assert_true(2 >= 0)
|
||||
@@ -1034,7 +1034,7 @@ def Test_expr4_greaterequal()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test < comperator
|
||||
" test < comparator
|
||||
def Test_expr4_smaller()
|
||||
var lines =<< trim END
|
||||
assert_false(2 < 0)
|
||||
@@ -1056,7 +1056,7 @@ def Test_expr4_smaller()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test <= comperator
|
||||
" test <= comparator
|
||||
def Test_expr4_smallerequal()
|
||||
var lines =<< trim END
|
||||
assert_false(2 <= 0)
|
||||
@@ -1081,7 +1081,7 @@ def Test_expr4_smallerequal()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test =~ comperator
|
||||
" test =~ comparator
|
||||
def Test_expr4_match()
|
||||
var lines =<< trim END
|
||||
assert_equal(false, '2' =~ '0')
|
||||
@@ -1098,7 +1098,7 @@ def Test_expr4_match()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test !~ comperator
|
||||
" test !~ comparator
|
||||
def Test_expr4_nomatch()
|
||||
var lines =<< trim END
|
||||
assert_equal(true, '2' !~ '0')
|
||||
@@ -1110,7 +1110,7 @@ def Test_expr4_nomatch()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test is comperator
|
||||
" test is comparator
|
||||
def Test_expr4_is()
|
||||
var lines =<< trim END
|
||||
var mylist = [2]
|
||||
@@ -1128,7 +1128,7 @@ def Test_expr4_is()
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" test isnot comperator
|
||||
" test isnot comparator
|
||||
def Test_expr4_isnot()
|
||||
var lines =<< trim END
|
||||
var mylist = [2]
|
||||
|
@@ -3631,7 +3631,7 @@ endfunc
|
||||
" exceptions.
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
func Test_execption_info_for_error()
|
||||
func Test_exception_info_for_error()
|
||||
CheckEnglish
|
||||
|
||||
let test =<< trim [CODE]
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4611,
|
||||
/**/
|
||||
4610,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user