changeset 28171:b4c111ea83b1 v8.2.4611

patch 8.2.4611: typos in tests; one lua line not covered by test Commit: https://github.com/vim/vim/commit/81b573d7e55bd48988f298ce8e652d902e9bdeba Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Tue Mar 22 21:14:55 2022 +0000 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 https://github.com/vim/vim/issues/9994)
author Bram Moolenaar <Bram@vim.org>
date Tue, 22 Mar 2022 22:30:03 +0100
parents e882a67c742e
children f5cd730da5b6
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 src/version.c
diffstat 14 files changed, 40 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_breakindent.vim
+++ b/src/testdir/test_breakindent.vim
@@ -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)
--- a/src/testdir/test_crypt.vim
+++ b/src/testdir/test_crypt.vim
@@ -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')
--- a/src/testdir/test_cursorline.vim
+++ b/src/testdir/test_cursorline.vim
@@ -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', {})
--- a/src/testdir/test_digraph.vim
+++ b/src/testdir/test_digraph.vim
@@ -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
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -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)
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -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
--- a/src/testdir/test_regexp_latin.vim
+++ b/src/testdir/test_regexp_latin.vim
@@ -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',
--- a/src/testdir/test_signals.vim
+++ b/src/testdir/test_signals.vim
@@ -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
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -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()
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -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
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -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*' ..
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -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]
--- a/src/testdir/test_vimscript.vim
+++ b/src/testdir/test_vimscript.vim
@@ -3631,7 +3631,7 @@ endfunc
 "	    exceptions.
 "-------------------------------------------------------------------------------
 
-func Test_execption_info_for_error()
+func Test_exception_info_for_error()
   CheckEnglish
 
   let test =<< trim [CODE]
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4611,
+/**/
     4610,
 /**/
     4609,