# HG changeset patch # User Bram Moolenaar # Date 1637495104 -3600 # Node ID 485c7c4afeb7374d00fdc5c199188ad40fb2e459 # Parent 2121bcd70ce61429ec7b7ac07411ea188021ef4c patch 8.2.3637: typos in test files Commit: https://github.com/vim/vim/commit/923dce2b07ff185c0ef661f3eca47bc17655f01b Author: Dominique Pelle Date: Sun Nov 21 11:36:04 2021 +0000 patch 8.2.3637: typos in test files Problem: Typos in test files. Solution: Correct the typos. (Dominique Pell?, closes https://github.com/vim/vim/issues/9175) diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -145,7 +145,7 @@ else endif if has('mac') - " In MacOS, when starting a shell in a terminal, a bash deprecation warning + " In macOS, when starting a shell in a terminal, a bash deprecation warning " message is displayed. This breaks the terminal test. Disable the warning " message. let $BASH_SILENCE_DEPRECATION_WARNING = 1 diff --git a/src/testdir/test_debugger.vim b/src/testdir/test_debugger.vim --- a/src/testdir/test_debugger.vim +++ b/src/testdir/test_debugger.vim @@ -500,7 +500,7 @@ func Test_Backtrace_Through_Source() call RunDbgCmd( buf, 'down', [ 'frame is zero' ] ) - " step until we have another meaninfgul trace + " step until we have another meaningful trace call RunDbgCmd(buf, 'step', ['line 5: func File2Function()']) call RunDbgCmd(buf, 'step', ['line 9: call File2Function()']) call RunDbgCmd(buf, 'backtrace', [ @@ -588,7 +588,7 @@ func Test_Backtrace_Autocmd() \ ['cmd: doautocmd User TestGlobalFunction']) call RunDbgCmd(buf, 'step', ['cmd: call GlobalFunction() | echo "Done"']) - " At this point the ontly thing in the stack is the autocommand + " At this point the only thing in the stack is the autocommand call RunDbgCmd(buf, 'backtrace', [ \ '>backtrace', \ '->0 User Autocommands for "TestGlobalFunction"', @@ -718,7 +718,7 @@ func Test_Backtrace_Autocmd() call RunDbgCmd( buf, 'down', [ 'frame is zero' ] ) - " step until we have another meaninfgul trace + " step until we have another meaningful trace call RunDbgCmd(buf, 'step', ['line 5: func File2Function()']) call RunDbgCmd(buf, 'step', ['line 9: call File2Function()']) call RunDbgCmd(buf, 'backtrace', [ @@ -845,7 +845,7 @@ func Test_Backtrace_CmdLine() call CheckDbgOutput(buf, ['command line', \ 'cmd: call GlobalFunction()'], #{msec: 5000}) - " At this point the ontly thing in the stack is the cmdline + " At this point the only thing in the stack is the cmdline call RunDbgCmd(buf, 'backtrace', [ \ '>backtrace', \ '->0 command line', @@ -1260,7 +1260,7 @@ func Test_debug_backtrace_level() \ #{ match: 'pattern' } ) " Expression evaluation in the script frame (not the function frame) - " FIXME: Unexpected in this scope (a: should not be visibnle) + " FIXME: Unexpected in this scope (a: should not be visible) call RunDbgCmd(buf, 'echo a:arg', [ 'arg1' ] ) call RunDbgCmd(buf, 'echo s:file1_var', [ 'file1' ] ) call RunDbgCmd(buf, 'echo g:global_var', [ 'global' ] ) diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -274,7 +274,7 @@ func Test_diffget_diffput_empty_buffer() endfunc " :diffput and :diffget completes names of buffers which -" are in diff mode and which are different then current buffer. +" are in diff mode and which are different than current buffer. " No completion when the current window is not in diff mode. func Test_diffget_diffput_completion() e Xdiff1 | diffthis @@ -677,7 +677,7 @@ func Test_diffexpr() call assert_notequal(normattr, screenattr(3, 1)) diffoff! - " Try using an non-existing function for 'diffexpr'. + " Try using a non-existing function for 'diffexpr'. set diffexpr=NewDiffFunc() call assert_fails('windo diffthis', ['E117:', 'E97:']) diffoff! diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim --- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -422,13 +422,13 @@ func Test_autoindent_remove_indent() " leaving insert mode in a new line with indent added by autoindent, should " remove the indent. call term_sendkeys(buf, "i\foo\\") - " Need to delay for sometime, otherwise the code in getchar.c will not be + " Need to delay for some time, otherwise the code in getchar.c will not be " exercised. call TermWait(buf, 50) " when a line is wrapped and the cursor is at the start of the second line, " leaving insert mode, should move the cursor back to the first line. call term_sendkeys(buf, "o" .. repeat('x', 20) .. "\") - " Need to delay for sometime, otherwise the code in getchar.c will not be + " Need to delay for some time, otherwise the code in getchar.c will not be " exercised. call TermWait(buf, 50) call term_sendkeys(buf, ":w\n") @@ -440,7 +440,7 @@ endfunc func Test_edit_CR() " Test for in insert mode - " basically only in quickfix mode ist tested, the rest + " basically only in quickfix mode it's tested, the rest " has been taken care of by other tests CheckFeature quickfix botright new diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim --- a/src/testdir/test_excmd.vim +++ b/src/testdir/test_excmd.vim @@ -603,7 +603,7 @@ func Sandbox_tests() if has('clientserver') call assert_fails('let s=remote_expr("gvim", "2+2")', 'E48:') if !has('win32') - " remote_foreground() doesn't thrown an error message on MS-Windows + " remote_foreground() doesn't throw an error message on MS-Windows call assert_fails('call remote_foreground("gvim")', 'E48:') endif call assert_fails('let s=remote_peek("gvim")', 'E48:') diff --git a/src/testdir/test_flatten.vim b/src/testdir/test_flatten.vim --- a/src/testdir/test_flatten.vim +++ b/src/testdir/test_flatten.vim @@ -54,7 +54,7 @@ func Test_flatten() call test_garbagecollect_now() call assert_equal([1, 2, 3], l:list) - " Tests for checking circular reference list can be flatten. + " Tests for checking circular reference list can be flattened. let l:x = [1] let l:y = [x] let l:z = flatten(l:y) diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -50,7 +50,7 @@ func Test_ins_complete() " i-add-expands and switches to local exe "normal OM\\\\\\\\\" call assert_equal("Makefile\tto\trun3", getline('.')) - " add-expands lines (it would end in an empty line if it didn't ignored + " add-expands lines (it would end in an empty line if it didn't ignore " itself) exe "normal o\\\\\\" call assert_equal("Makefile\tto\trun3", getline('.')) diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim --- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -1243,7 +1243,7 @@ func Test_normal18_z_fold() norm! j call assert_equal('52', getline('.')) - " zA on a opened fold when foldenable is not set + " zA on an opened fold when foldenable is not set 50 set nofoldenable norm! zA @@ -1601,7 +1601,7 @@ func Test_normal23_K() let not_gnu_man = has('mac') || has('bsd') if not_gnu_man - " In MacOS and BSD, the option for specifying a pager is different + " In macOS and BSD, the option for specifying a pager is different set keywordprg=man\ -P\ cat else set keywordprg=man\ --pager=cat @@ -2394,7 +2394,7 @@ func Test_normal33_g_cmd2() call assert_equal('foo first line', getline(1)) set virtualedit& - " Test for aboring a g command using CTRL-\ CTRL-G + " Test for aborting a g command using CTRL-\ CTRL-G exe "normal! g\\" call assert_equal('foo first line', getline('.')) diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -1154,7 +1154,7 @@ func Test_cmdheight() set cmdheight& endfunc -" To specify a control character as a option value, '^' can be used +" To specify a control character as an option value, '^' can be used func Test_opt_control_char() set wildchar=^v call assert_equal("\", nr2char(&wildchar)) diff --git a/src/testdir/test_python2.vim b/src/testdir/test_python2.vim --- a/src/testdir/test_python2.vim +++ b/src/testdir/test_python2.vim @@ -412,7 +412,7 @@ func Test_python_dict() py d = vim.bindeval('d') call assert_equal(2, pyeval('len(d)')) - " Deleting an non-existing key + " Deleting a non-existing key call AssertException(["py del d['c']"], "Vim(python):KeyError: 'c'") endfunc diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim --- a/src/testdir/test_python3.vim +++ b/src/testdir/test_python3.vim @@ -605,7 +605,7 @@ func Test_python3_dict() py3 d = vim.bindeval('d') call assert_equal(2, py3eval('len(d)')) - " Deleting an non-existing key + " Deleting a non-existing key call AssertException(["py3 del d['c']"], "Vim(py3):KeyError: 'c'") endfunc diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -2865,7 +2865,7 @@ func XvimgrepTests(cchar) call writefile(['Editor:VIM vim', \ 'Editor:Emacs EmAcS', \ 'Editor:Notepad NOTEPAD'], 'Xtestfile1') - call writefile(['Linux', 'MacOS', 'MS-Windows'], 'Xtestfile2') + call writefile(['Linux', 'macOS', 'MS-Windows'], 'Xtestfile2') " Error cases call assert_fails('Xvimgrep /abc *', 'E682:') @@ -2879,7 +2879,7 @@ func XvimgrepTests(cchar) Xexpr "" Xvimgrepadd Notepad Xtestfile1 - Xvimgrepadd MacOS Xtestfile2 + Xvimgrepadd macOS Xtestfile2 let l = g:Xgetlist() call assert_equal(2, len(l)) call assert_equal('Editor:Notepad NOTEPAD', l[0].text) @@ -4126,7 +4126,7 @@ endfunc func Test_shorten_fname() CheckUnix %bwipe - " Create a quickfix list with a absolute path filename + " Create a quickfix list with an absolute path filename let fname = getcwd() . '/test_quickfix.vim' call setqflist([], ' ', {'lines':[fname . ":20:Line20"], 'efm':'%f:%l:%m'}) call assert_equal(fname, bufname('test_quickfix.vim')) @@ -4135,7 +4135,7 @@ func Test_shorten_fname() call assert_equal('test_quickfix.vim', bufname('test_quickfix.vim')) cclose %bwipe - " Create a quickfix list with a absolute path filename + " Create a quickfix list with an absolute path filename call setqflist([], ' ', {'lines':[fname . ":20:Line20"], 'efm':'%f:%l:%m'}) call assert_equal(fname, bufname('test_quickfix.vim')) " Displaying the quickfix list should simplify the file path diff --git a/src/testdir/test_recover.vim b/src/testdir/test_recover.vim --- a/src/testdir/test_recover.vim +++ b/src/testdir/test_recover.vim @@ -361,7 +361,7 @@ func Test_recover_encrypted_swap_file() endfunc " Test for :recover using a unreadable swap file -func Test_recover_unreadble_swap_file() +func Test_recover_unreadable_swap_file() CheckUnix CheckNotRoot new Xfile1 diff --git a/src/testdir/test_spellfile.vim b/src/testdir/test_spellfile.vim --- a/src/testdir/test_spellfile.vim +++ b/src/testdir/test_spellfile.vim @@ -702,7 +702,7 @@ func Test_aff_file_format_error() let output = execute('mkspell! Xtest.spl Xtest') call assert_match('Different combining flag in continued affix block in Xtest.aff line 3', output) - " Try to reuse a affix used for BAD flag + " Try to reuse an affix used for BAD flag call writefile(['BAD x', 'PFX x Y 1', 'PFX x 0 re x'], 'Xtest.aff') let output = execute('mkspell! Xtest.spl Xtest') call assert_match('Affix also used for BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST in Xtest.aff line 2: x', output) diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim --- a/src/testdir/test_syntax.vim +++ b/src/testdir/test_syntax.vim @@ -502,8 +502,7 @@ endfunc func Test_bg_detection() CheckNotGui - " auto-detection of &bg, make sure sure it isn't set anywhere before - " this test + " auto-detection of &bg, make sure it isn't set anywhere before this test hi Normal ctermbg=0 call assert_equal('dark', &bg) hi Normal ctermbg=4 diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -314,8 +314,8 @@ func Test_term_mouse_middle_click_insert call setline(1, ['123456789', '123456789']) let @* = 'abc' - " Middle-click in inesrt mode doesn't move the cursor but inserts the - " contents of aregister + " Middle-click in insert mode doesn't move the cursor but inserts the + " contents of a register call cursor(1, 4) call feedkeys('i' .. \ MouseMiddleClickCode(2, 7) .. MouseMiddleReleaseCode(2, 7) .. @@ -365,7 +365,7 @@ func Test_term_mouse_switch_win_insert_m close! endfunc -" Test for using the mouse to increaes the height of the cmdline window +" Test for using the mouse to increase the height of the cmdline window func Test_mouse_cmdwin_resize() CheckFeature cmdwin diff --git a/src/testdir/test_textobjects.vim b/src/testdir/test_textobjects.vim --- a/src/testdir/test_textobjects.vim +++ b/src/testdir/test_textobjects.vim @@ -205,7 +205,7 @@ func Test_empty_html_tag() normal 0f\d\+_ImpFunc\[1\]..\d\+_ExpFunc, line 1', v:throwpoint) endtry @@ -4579,7 +4579,7 @@ def ProfiledNestedProfiled() Nested() enddef -" Execute this near the end, profiling doesn't stop until Vim exists. +" Execute this near the end, profiling doesn't stop until Vim exits. " This only tests that it works, not the profiling output. def Test_xx_profile_with_lambda() CheckFeature profile diff --git a/src/testdir/test_viminfo.vim b/src/testdir/test_viminfo.vim --- a/src/testdir/test_viminfo.vim +++ b/src/testdir/test_viminfo.vim @@ -635,12 +635,12 @@ func Test_viminfo_file_marks() call test_settime(35) edit again call test_settime(40) - edit fourty + edit forty wviminfo Xviminfo sp Xviminfo 1 - for name in ['fourty', 'again', 'thirty', 'twenty', 'ten'] + for name in ['forty', 'again', 'thirty', 'twenty', 'ten'] /^> call assert_equal(name, substitute(getline('.'), '.*/', '', '')) endfor @@ -950,7 +950,7 @@ func Test_viminfofile_none() let &viminfofile = save_vif endfunc -" Test for an unwritable and unreadble 'viminfo' file +" Test for an unwritable and unreadable 'viminfo' file func Test_viminfo_perm() CheckUnix CheckNotRoot diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3637, +/**/ 3636, /**/ 3635,