Patch 8.2.4611

5 views
Skip to first unread message

Bram Moolenaar

unread,
Mar 22, 2022, 5:15:37 PM3/22/22
to vim...@googlegroups.com

Patch 8.2.4611
Problem: Typos in tests; one lua line not covered by test.
Solution: Fix typos. Add test case. (Dominique Pellé, closes #9994)
Files: src/testdir/test_breakindent.vim, src/testdir/test_crypt.vim,
src/testdir/test_cursorline.vim, src/testdir/test_digraph.vim,
src/testdir/test_gui.vim, src/testdir/test_lua.vim,
src/testdir/test_regexp_latin.vim, src/testdir/test_signals.vim,
src/testdir/test_spell.vim, src/testdir/test_statusline.vim,
src/testdir/test_vim9_disassemble.vim,
src/testdir/test_vim9_expr.vim, src/testdir/test_vimscript.vim


*** ../vim-8.2.4610/src/testdir/test_breakindent.vim 2022-03-03 20:03:44.657088284 +0000
--- src/testdir/test_breakindent.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 731,737 ****
\ "shall make no law ",
\ ]
call s:compare_lines(expect, lines)
! " set mininum indent
setl briopt=min:5
redraw!
let lines = s:screen_lines2(1, 6, 20)
--- 731,737 ----
\ "shall make no law ",
\ ]
call s:compare_lines(expect, lines)
! " set minimum indent
setl briopt=min:5
redraw!
let lines = s:screen_lines2(1, 6, 20)
*** ../vim-8.2.4610/src/testdir/test_crypt.vim 2021-10-11 16:26:55.574732816 +0100
--- src/testdir/test_crypt.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 172,178 ****
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])
call assert_match('"Xcrypt_sodium.txt".*4000L, 18893B written', execute(':message'))
bw!
call delete('Xcrypt_sodium.txt')
--- 172,178 ----
call assert_equal(range(1, 4000)->map( {_, v -> string(v)}), getline(1,'$'))
set key=
w! ++ff=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')
*** ../vim-8.2.4610/src/testdir/test_cursorline.vim 2022-03-19 11:09:52.519730941 +0000
--- src/testdir/test_cursorline.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 162,168 ****
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
call term_sendkeys(buf, "gg0")
call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>")
call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
--- 162,168 ----
call term_sendkeys(buf, "gj")
call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
if exists("+foldcolumn") && exists("+signcolumn") && exists("+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', {})
*** ../vim-8.2.4610/src/testdir/test_digraph.vim 2021-09-08 13:57:38.237188053 +0100
--- src/testdir/test_digraph.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 51,57 ****
call Put_Dig("'e")
call Put_Dig("b'") " not defined
call assert_equal(["á", "é", "'"], getline(line('.')-2,line('.')))
! " Cicumflex
call Put_Dig("a>")
call Put_Dig(">e")
call Put_Dig("b>") " not defined
--- 51,57 ----
call Put_Dig("'e")
call Put_Dig("b'") " not defined
call assert_equal(["á", "é", "'"], getline(line('.')-2,line('.')))
! " Circumflex
call Put_Dig("a>")
call Put_Dig(">e")
call Put_Dig("b>") " not defined
*** ../vim-8.2.4610/src/testdir/test_gui.vim 2022-03-07 16:57:18.335101482 +0000
--- src/testdir/test_gui.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 274,280 ****
" Multiline balloon using NL
new
func MyBalloonFuncForMultilineUsingNL()
! return "Multiline\nSuppported\nBalloon\nusing NL"
endfunc
setl balloonexpr=MyBalloonFuncForMultilineUsingNL()
setl ballooneval
--- 274,280 ----
" Multiline balloon using NL
new
func MyBalloonFuncForMultilineUsingNL()
! return "Multiline\nSupported\nBalloon\nusing NL"
endfunc
setl balloonexpr=MyBalloonFuncForMultilineUsingNL()
setl ballooneval
***************
*** 289,295 ****
" Multiline balloon using List
new
func MyBalloonFuncForMultilineUsingList()
! return [ 'Multiline', 'Suppported', 'Balloon', 'using List' ]
endfunc
setl balloonexpr=MyBalloonFuncForMultilineUsingList()
setl ballooneval
--- 289,295 ----
" Multiline balloon using List
new
func MyBalloonFuncForMultilineUsingList()
! return [ 'Multiline', 'Supported', 'Balloon', 'using List' ]
endfunc
setl balloonexpr=MyBalloonFuncForMultilineUsingList()
setl ballooneval
***************
*** 1453,1477 ****
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)
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)
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)
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)
call cursor(1, 5)
let args = #{find_text: 'TWO', repl_text: 'two', flags: 0x3, forward: 1}
call test_gui_event('findrepl', args)
--- 1453,1477 ----
call test_gui_event('findrepl', args)
call assert_equal(['ONE TWO ONE', 'Twoo ONE TWO ONEo'], getline(1, '$'))

! " 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 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 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 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)
*** ../vim-8.2.4610/src/testdir/test_lua.vim 2022-03-20 11:45:57.303043836 +0000
--- src/testdir/test_lua.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 1208,1218 ****
call WaitForAssert({-> assert_equal('42', 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))})

call StopVimInTerminal(buf)
- call delete('XtestLuaDebug.vim')
endfunc

" vim: shiftwidth=2 sts=2 expandtab
--- 1208,1228 ----
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)
endfunc

" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.4610/src/testdir/test_regexp_latin.vim 2022-01-02 16:16:30.523363109 +0000
--- src/testdir/test_regexp_latin.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 799,805 ****
bwipe!
endfunc

! " Check a pattern with a look beind crossing a line boundary
func Test_lookbehind_across_line()
new
call append(0, ['Behind:', 'asdfasd<yyy', 'xxstart1', 'asdfasd<yy',
--- 799,805 ----
bwipe!
endfunc

! " 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',
*** ../vim-8.2.4610/src/testdir/test_signals.vim 2021-12-29 19:41:42.446404689 +0000
--- src/testdir/test_signals.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 99,106 ****
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 StopVimInTerminal(buf)
endfunc
--- 99,106 ----
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, 'INTERRUPTED')\n")
! call WaitForAssert({-> assert_equal('INTERRUPTED', term_getline(buf, 1))})

call StopVimInTerminal(buf)
endfunc
*** ../vim-8.2.4610/src/testdir/test_spell.vim 2022-03-13 20:12:21.322709463 +0000
--- src/testdir/test_spell.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 417,423 ****
bwipe!
endfunc

! " Test for 'spellsuggest' expr errrors
func Test_spellsuggest_expr_errors()
" 'spellsuggest'
func MySuggest()
--- 417,423 ----
bwipe!
endfunc

! " Test for 'spellsuggest' expr errors
func Test_spellsuggest_expr_errors()
" 'spellsuggest'
func MySuggest()
*** ../vim-8.2.4610/src/testdir/test_statusline.vim 2022-01-14 20:11:34.917647651 +0000
--- src/testdir/test_statusline.vim 2022-03-22 21:08:06.173056803 +0000
***************
*** 260,266 ****
call assert_match('^vimLineComment\s*$', s:get_statusline())
syntax off

! "%{%expr%}: evaluates enxpressions present in result of expr
func! Inner_eval()
return '%n some other text'
endfunc
--- 260,266 ----
call assert_match('^vimLineComment\s*$', s:get_statusline())
syntax off

! "%{%expr%}: evaluates expressions present in result of expr
func! Inner_eval()
return '%n some other text'
endfunc
*** ../vim-8.2.4610/src/testdir/test_vim9_disassemble.vim 2022-03-08 13:18:10.813020777 +0000
--- src/testdir/test_vim9_disassemble.vim 2022-03-22 21:08:06.177056801 +0000
***************
*** 2004,2010 ****
echo "" ?? "empty string"
enddef

! def Test_dsassemble_falsy_op()
var res = execute('disass s:FalsyOp')
assert_match('\<SNR>\d*_FalsyOp\_s*' ..
'echo g:flag ?? "yes"\_s*' ..
--- 2004,2010 ----
echo "" ?? "empty string"
enddef

! def Test_disassemble_falsy_op()
var res = execute('disass s:FalsyOp')
assert_match('\<SNR>\d*_FalsyOp\_s*' ..
'echo g:flag ?? "yes"\_s*' ..
*** ../vim-8.2.4610/src/testdir/test_vim9_expr.vim 2022-03-20 21:14:08.438143810 +0000
--- src/testdir/test_vim9_expr.vim 2022-03-22 21:08:06.177056801 +0000
***************
*** 563,569 ****
let alist = [2, 3, 4]
let adict = #{aaa: 2, bbb: 8}

! " test == comperator
def Test_expr4_equal()
var lines =<< trim END
var trueVar = true
--- 563,569 ----
let alist = [2, 3, 4]
let adict = #{aaa: 2, bbb: 8}

! " test == comparator
def Test_expr4_equal()
var lines =<< trim END
var trueVar = true
***************
*** 902,908 ****
'echo n < true'], 'E1072:', 2)
enddef

! " test != comperator
def Test_expr4_notequal()
var lines =<< trim END
var trueVar = true
--- 902,908 ----
'echo n < true'], 'E1072:', 2)
enddef

! " test != comparator
def Test_expr4_notequal()
var lines =<< trim END
var trueVar = true
***************
*** 987,993 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test > comperator
def Test_expr4_greater()
var lines =<< trim END
assert_true(2 > 0)
--- 987,993 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test > comparator
def Test_expr4_greater()
var lines =<< trim END
assert_true(2 > 0)
***************
*** 1013,1019 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test >= comperator
def Test_expr4_greaterequal()
var lines =<< trim END
assert_true(2 >= 0)
--- 1013,1019 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test >= comparator
def Test_expr4_greaterequal()
var lines =<< trim END
assert_true(2 >= 0)
***************
*** 1034,1040 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test < comperator
def Test_expr4_smaller()
var lines =<< trim END
assert_false(2 < 0)
--- 1034,1040 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test < comparator
def Test_expr4_smaller()
var lines =<< trim END
assert_false(2 < 0)
***************
*** 1056,1062 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test <= comperator
def Test_expr4_smallerequal()
var lines =<< trim END
assert_false(2 <= 0)
--- 1056,1062 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test <= comparator
def Test_expr4_smallerequal()
var lines =<< trim END
assert_false(2 <= 0)
***************
*** 1081,1087 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test =~ comperator
def Test_expr4_match()
var lines =<< trim END
assert_equal(false, '2' =~ '0')
--- 1081,1087 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test =~ comparator
def Test_expr4_match()
var lines =<< trim END
assert_equal(false, '2' =~ '0')
***************
*** 1098,1104 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test !~ comperator
def Test_expr4_nomatch()
var lines =<< trim END
assert_equal(true, '2' !~ '0')
--- 1098,1104 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test !~ comparator
def Test_expr4_nomatch()
var lines =<< trim END
assert_equal(true, '2' !~ '0')
***************
*** 1110,1116 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test is comperator
def Test_expr4_is()
var lines =<< trim END
var mylist = [2]
--- 1110,1116 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test is comparator
def Test_expr4_is()
var lines =<< trim END
var mylist = [2]
***************
*** 1128,1134 ****
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test isnot comperator
def Test_expr4_isnot()
var lines =<< trim END
var mylist = [2]
--- 1128,1134 ----
v9.CheckDefAndScriptSuccess(lines)
enddef

! " test isnot comparator
def Test_expr4_isnot()
var lines =<< trim END
var mylist = [2]
*** ../vim-8.2.4610/src/testdir/test_vimscript.vim 2022-03-08 19:43:51.692198946 +0000
--- src/testdir/test_vimscript.vim 2022-03-22 21:08:06.177056801 +0000
***************
*** 3631,3637 ****
" exceptions.
"-------------------------------------------------------------------------------

! func Test_execption_info_for_error()
CheckEnglish

let test =<< trim [CODE]
--- 3631,3637 ----
" exceptions.
"-------------------------------------------------------------------------------

! func Test_exception_info_for_error()
CheckEnglish

let test =<< trim [CODE]
*** ../vim-8.2.4610/src/version.c 2022-03-22 20:42:09.178172849 +0000
--- src/version.c 2022-03-22 21:11:55.784734448 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4611,
/**/

--
[clop clop]
GUARD #1: Halt! Who goes there?
ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of
Camelot. King of the Britons, defeator of the Saxons, sovereign of
all England!
GUARD #1: Pull the other one!
The Quest for the Holy Grail (Monty Python)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages