# HG changeset patch # User Bram Moolenaar # Date 1674934204 -3600 # Node ID dbec60b8c25343cd623f35be158955e33aa82bca # Parent b83cac410fcfd6f2bac8de44c6dfcdc8d6d147f1 patch 9.0.1257: code style is not check in test scripts Commit: https://github.com/vim/vim/commit/94722c510745a0cfd494c51625a514b92dd2bfb2 Author: Bram Moolenaar Date: Sat Jan 28 19:19:03 2023 +0000 patch 9.0.1257: code style is not check in test scripts Problem: Code style is not check in test scripts. Solution: Add basic code style check for test files. diff --git a/src/testdir/keycode_check.vim b/src/testdir/keycode_check.vim --- a/src/testdir/keycode_check.vim +++ b/src/testdir/keycode_check.vim @@ -4,8 +4,8 @@ vim9script # # Usage: vim -u NONE -S keycode_check.vim # -# Author: Bram Moolenaar -# Last Update: 2022 Nov 15 +# Author: Bram Moolenaar +# Last Update: 2022 Nov 15 # # The codes are stored in the file "keycode_check.json", so that you can # compare the results of various terminals. @@ -449,7 +449,7 @@ enddef # The main loop while true var action = inputlist(['Select operation:', - '1. List results', + '1. List results', '2. Add results for a new terminal', '3. Replace results', '4. Clear results', diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -59,7 +59,7 @@ if has('gui_running') endif " Check that the screen size is at least 24 x 80 characters. -if &lines < 24 || &columns < 80 +if &lines < 24 || &columns < 80 let error = 'Screen size too small! Tests require at least 24 lines with 80 characters, got ' .. &lines .. ' lines with ' .. &columns .. ' characters' echoerr error split test.log diff --git a/src/testdir/setup.vim b/src/testdir/setup.vim --- a/src/testdir/setup.vim +++ b/src/testdir/setup.vim @@ -20,7 +20,7 @@ if has('packages') let &packpath = &rtp endif -" Only when the +eval feature is present. +" Only when the +eval feature is present. if 1 " Make sure the .Xauthority file can be found after changing $HOME. if $XAUTHORITY == '' diff --git a/src/testdir/summarize.vim b/src/testdir/summarize.vim --- a/src/testdir/summarize.vim +++ b/src/testdir/summarize.vim @@ -33,7 +33,7 @@ if 1 silent %s/^SKIPPED \zs.*/\=Count(submatch(0), 'skipped')/egn silent %s/^\(\d\+\)\s\+FAILED:/\=Count(submatch(1), 'failed')/egn - call extend(output, ["Skipped:"]) + call extend(output, ["Skipped:"]) call extend(output, skipped_output) call extend(output, [ diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim --- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -190,9 +190,9 @@ func Test_wrong_error_type() endfunc func Test_compare_fail() - let s:v = {} - let s:x = {"a": s:v} - let s:v["b"] = s:x + let s:v = {} + let s:x = {"a": s:v} + let s:v["b"] = s:x let s:w = {"c": s:x, "d": ''} try call assert_equal(s:w, '') diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -269,8 +269,8 @@ func Test_win_tab_autocmd() augroup testing au WinNew * call add(g:record, 'WinNew') au WinClosed * call add(g:record, 'WinClosed') - au WinEnter * call add(g:record, 'WinEnter') - au WinLeave * call add(g:record, 'WinLeave') + au WinEnter * call add(g:record, 'WinEnter') + au WinLeave * call add(g:record, 'WinLeave') au TabNew * call add(g:record, 'TabNew') au TabClosed * call add(g:record, 'TabClosed') au TabEnter * call add(g:record, 'TabEnter') @@ -3406,7 +3406,7 @@ endfunc func Test_Visual_doautoall_redraw() call setline(1, ['a', 'b']) - new + new wincmd p call feedkeys("G\", 'txn') autocmd User Explode ++once redraw @@ -4121,7 +4121,7 @@ endfunc func Test_autocmd_split_dummy() " Autocommand trying to split a window containing a dummy buffer. - auto BufReadPre * exe "sbuf " .. expand("") + auto BufReadPre * exe "sbuf " .. expand("") " Avoid the "W11" prompt au FileChangedShell * let v:fcs_choice = 'reload' func Xautocmd_changelist() diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim --- a/src/testdir/test_blob.vim +++ b/src/testdir/test_blob.vim @@ -498,7 +498,7 @@ func Test_blob_read_write() call assert_equal(b[-3 :], br5) VAR br6 = readblob('Xblob', -3, 2) call assert_equal(b[-3 : -2], br6) - + #" reading past end of file, empty result VAR br1e = readblob('Xblob', 10000) call assert_equal(0z, br1e) diff --git a/src/testdir/test_blockedit.vim b/src/testdir/test_blockedit.vim --- a/src/testdir/test_blockedit.vim +++ b/src/testdir/test_blockedit.vim @@ -52,7 +52,7 @@ func Test_blockinsert_autoindent() let expected =<< trim END vim9script var d = { - a: (): asdf => 0, + a: (): asdf => 0, b: (): asdf => 0, c: (): asdf => 0, } diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -20,7 +20,7 @@ endif " call ch_logfile('channellog', 'w') func SetUp() - if g:testfunc =~ '_ipv6()$' + if g:testfunc =~ '_ipv6()$' let s:localhost = '[::1]:' let s:testscript = 'test_channel_6.py' elseif g:testfunc =~ '_unix()$' @@ -1220,7 +1220,7 @@ endfunc func Test_pipe_to_buffer_raw() let options = {'out_mode': 'raw', 'out_io': 'buffer', 'out_name': 'testout'} split testout - let job = job_start([s:python, '-c', + let job = job_start([s:python, '-c', \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options) " the job may be done quickly, also accept "dead" call assert_match('^\%(dead\|run\)$', job_status(job)) diff --git a/src/testdir/test_cmd_lists.vim b/src/testdir/test_cmd_lists.vim --- a/src/testdir/test_cmd_lists.vim +++ b/src/testdir/test_cmd_lists.vim @@ -50,7 +50,7 @@ func Test_cmd_lists() \ 'interface', \ 'public', \ 'static', - \ 'this', + \ 'this', \ 'type', \ '++', \ '--', diff --git a/src/testdir/test_codestyle.vim b/src/testdir/test_codestyle.vim --- a/src/testdir/test_codestyle.vim +++ b/src/testdir/test_codestyle.vim @@ -41,5 +41,42 @@ def Test_source_files() bwipe! enddef +def Test_test_files() + for fname in glob('*.vim', 0, 1) + exe 'edit ' .. fname + + # some files intentionally have misplaced white space + if fname =~ 'test_cindent.vim' || fname =~ 'test_join.vim' + continue + endif + + # skip files that are known to have a space before a tab + if fname !~ 'test_comments.vim' + && fname !~ 'test_listchars.vim' + && fname !~ 'test_visual.vim' + cursor(1, 1) + var lnum = search(fname =~ "test_regexp_latin" ? '[^á] \t' : ' \t') + assert_equal(0, lnum, 'testdir/' .. fname .. ': space before tab') + endif + + # skip files that are known to have trailing white space + if fname !~ 'test_cmdline.vim' + && fname !~ 'test_let.vim' + && fname !~ 'test_tagjump.vim' + && fname !~ 'test_vim9_cmd.vim' + cursor(1, 1) + var lnum = search( + fname =~ 'test_vim9_assign.vim' ? '[^=]\s$' + : fname =~ 'test_vim9_class.vim' ? '[^)]\s$' + : fname =~ 'test_vim9_script.vim' ? '[^,:3]\s$' + : fname =~ 'test_visual.vim' ? '[^/]\s$' + : '[^\\]\s$') + assert_equal(0, lnum, 'testdir/' .. fname .. ': trailing white space') + endif + endfor + + bwipe! +enddef + " vim: shiftwidth=2 sts=2 expandtab 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 @@ -360,7 +360,7 @@ func Test_dp_do_buffer() call assert_equal('10', getline('.')) 21 call assert_equal('two', getline('.')) - diffget one + diffget one call assert_equal('20', getline('.')) 31 @@ -1113,7 +1113,7 @@ func Test_diff_with_syntax() CheckScreendump let lines =<< trim END - void doNothing() { + void doNothing() { int x = 0; char *s = "hello"; return 5; @@ -1121,7 +1121,7 @@ func Test_diff_with_syntax() END call writefile(lines, 'Xprogram1.c', 'D') let lines =<< trim END - void doSomething() { + void doSomething() { int x = 0; char *s = "there"; return 5; @@ -1130,7 +1130,7 @@ func Test_diff_with_syntax() call writefile(lines, 'Xprogram2.c', 'D') let lines =<< trim END - edit Xprogram1.c + edit Xprogram1.c diffsplit Xprogram2.c END call writefile(lines, 'Xtest_diff_syntax', 'D') @@ -1307,12 +1307,12 @@ endfunc func Test_diff_and_scroll() " this was causing an ml_get error set ls=2 - for i in range(winheight(0) * 2) - call setline(i, i < winheight(0) - 10 ? i : i + 10) + for i in range(winheight(0) * 2) + call setline(i, i < winheight(0) - 10 ? i : i + 10) endfor vnew - for i in range(winheight(0)*2 + 10) - call setline(i, i < winheight(0) - 10 ? 0 : i) + for i in range(winheight(0)*2 + 10) + call setline(i, i < winheight(0) - 10 ? 0 : i) endfor diffthis wincmd p 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 @@ -2072,7 +2072,7 @@ func Test_edit_overlong_file_name() file %%%%%%%%%%%%%%%%%%%%%%%%%% file %%%%%% set readonly - set ls=2 + set ls=2 redraw! set noreadonly ls& diff --git a/src/testdir/test_expand.vim b/src/testdir/test_expand.vim --- a/src/testdir/test_expand.vim +++ b/src/testdir/test_expand.vim @@ -45,9 +45,9 @@ endfunc func Test_expand_tilde_filename() split ~ - call assert_equal('~', expand('%')) + call assert_equal('~', expand('%')) call assert_notequal(expand('%:p'), expand('~/')) - call assert_match('\~', expand('%:p')) + call assert_match('\~', expand('%:p')) bwipe! endfunc diff --git a/src/testdir/test_expand_dllpath.vim b/src/testdir/test_expand_dllpath.vim --- a/src/testdir/test_expand_dllpath.vim +++ b/src/testdir/test_expand_dllpath.vim @@ -4,12 +4,12 @@ func s:test_expand_dllpath(optname) let $TEST_EXPAND_DLLPATH = '/dllpath/lib' . substitute(a:optname, '\zedll$', '.', '') execute 'let dllpath_save = &' . a:optname try - execute 'set ' . a:optname . '=$TEST_EXPAND_DLLPATH' - execute 'call assert_equal("' . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')' + execute 'set ' . a:optname . '=$TEST_EXPAND_DLLPATH' + execute 'call assert_equal("' . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')' execute 'set ' . a:optname . '=~' . $TEST_EXPAND_DLLPATH let home = substitute($HOME, '\\', '/', 'g') - execute 'call assert_equal("' . home . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')' + execute 'call assert_equal("' . home . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')' finally execute 'let &' . a:optname . ' = dllpath_save' let $TEST_EXPAND_DLLPATH = '' diff --git a/src/testdir/test_expand_func.vim b/src/testdir/test_expand_func.vim --- a/src/testdir/test_expand_func.vim +++ b/src/testdir/test_expand_func.vim @@ -7,15 +7,15 @@ let s:slnum = str2nr(expand('')) let s:sflnum = str2nr(expand('')) func s:expand_sfile() - return expand('') + return expand('') endfunc func s:expand_slnum() - return str2nr(expand('')) + return str2nr(expand('')) endfunc func s:expand_sflnum() - return str2nr(expand('')) + return str2nr(expand('')) endfunc " This test depends on the location in the test file, put it first. diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -456,7 +456,7 @@ func Test_move_folds_around_manual() %foldopen! 13m7 call Check_foldlevels([1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 0]) - + bw! endfunc @@ -705,7 +705,7 @@ func Test_fold_create_marker_in_C() let content =<< trim [CODE] /* * comment - * + * * */ int f(int* p) { diff --git a/src/testdir/test_goto.vim b/src/testdir/test_goto.vim --- a/src/testdir/test_goto.vim +++ b/src/testdir/test_goto.vim @@ -17,7 +17,7 @@ endfunc func Test_gD() let lines =<< trim [CODE] int x; - + int func(void) { return x; @@ -30,7 +30,7 @@ endfunc func Test_gD_too() let lines =<< trim [CODE] Filename x; - + int Filename int func() { Filename x; @@ -44,7 +44,7 @@ func Test_gD_comment() let lines =<< trim [CODE] /* int x; */ int x; - + int func(void) { return x; @@ -58,7 +58,7 @@ func Test_gD_inline_comment() let lines =<< trim [CODE] int y /* , x */; int x; - + int func(void) { return x; @@ -72,7 +72,7 @@ func Test_gD_string() let lines =<< trim [CODE] char *s[] = "x"; int x = 1; - + int func(void) { return x; @@ -85,7 +85,7 @@ endfunc func Test_gD_string_same_line() let lines =<< trim [CODE] char *s[] = "x", int x = 1; - + int func(void) { return x; @@ -99,7 +99,7 @@ func Test_gD_char() let lines =<< trim [CODE] char c = 'x'; int x = 1; - + int func(void) { return x; @@ -112,7 +112,7 @@ endfunc func Test_gd() let lines =<< trim [CODE] int x; - + int func(int x) { return x; @@ -146,7 +146,7 @@ func Test_gd_not_local() { return x; } - + int func2(int x) { return x; @@ -173,9 +173,9 @@ func Test_gd_missing_braces() def func1(a) a + 1 end - + a = 1 - + def func2() return a end @@ -252,11 +252,11 @@ func Test_gd_inline_comment_body() int func(void) { int y /* , x */; - + for (/* int x = 0 */; y < 2; y++); - + int x = 0; - + return x; } [CODE] @@ -292,7 +292,7 @@ func Test_gd_string() { char *s = "x"; int x = 1; - + return x; } [CODE] @@ -304,7 +304,7 @@ func Test_gd_string_only() int func(void) { char *s = "x"; - + return x; } [CODE] @@ -341,7 +341,7 @@ func Test_gd_local_block() char *b = "NULL"; return b; } - + return 0; } [CODE] diff --git a/src/testdir/test_increment.vim b/src/testdir/test_increment.vim --- a/src/testdir/test_increment.vim +++ b/src/testdir/test_increment.vim @@ -704,7 +704,7 @@ endfunc " Text: " 1 23 " 4 56 -" +" " Expected: " 1) f2 Ctrl-V jl , repeat twice afterwards with . " 1 26 diff --git a/src/testdir/test_indent.vim b/src/testdir/test_indent.vim --- a/src/testdir/test_indent.vim +++ b/src/testdir/test_indent.vim @@ -175,7 +175,7 @@ func Test_modeline_indent_expr() endfunc func Test_indent_func_with_gq() - + function GetTeXIndent() " Sample indent expression for TeX files let lnum = prevnonblank(v:lnum - 1) @@ -186,7 +186,7 @@ func Test_indent_func_with_gq() let line = getline(lnum) let ind = indent(lnum) " Add a 'shiftwidth' after beginning of environments. - if line =~ '\\begin{center}' + if line =~ '\\begin{center}' let ind = ind + shiftwidth() endif return ind @@ -248,7 +248,7 @@ func Test_indent_func_with_gq() bwipe! delmark ab - delfunction GetTeXIndent + delfunction GetTeXIndent endfu func Test_formatting_keeps_first_line_indent() 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 @@ -2149,7 +2149,7 @@ endfunc func Test_ins_complete_end_of_line() " this was reading past the end of the line - new + new norm 8o€ý  sil! norm o diff --git a/src/testdir/test_listchars.vim b/src/testdir/test_listchars.vim --- a/src/testdir/test_listchars.vim +++ b/src/testdir/test_listchars.vim @@ -506,7 +506,7 @@ func Test_listchars_composing() set list set listchars=eol:$,space:_,nbsp:= - + let nbsp1 = nr2char(0xa0) let nbsp2 = nr2char(0x202f) call append(0, [ diff --git a/src/testdir/test_map_functions.vim b/src/testdir/test_map_functions.vim --- a/src/testdir/test_map_functions.vim +++ b/src/testdir/test_map_functions.vim @@ -1,7 +1,7 @@ " Tests for maparg(), mapcheck(), mapset(), maplist() " Also test utf8 map with a 0x80 byte. -func s:SID() +func s:SID() return str2nr(matchstr(expand(''), '\zs\d\+\ze_SID$')) endfunc @@ -18,7 +18,7 @@ func Test_maparg() call assert_equal({'silent': 0, 'noremap': 0, 'script': 0, 'lhs': 'foo', \ 'lhsraw': "foo\x80\xfc\x04V", 'lhsrawalt': "foo\x16", \ 'mode': ' ', 'nowait': 0, 'expr': 0, 'sid': sid, 'scriptversion': 1, - \ 'lnum': lnum + 1, + \ 'lnum': lnum + 1, \ 'rhs': 'isfoo', 'buffer': 0, 'abbr': 0, 'mode_bits': 0x47}, \ maparg('foo', '', 0, 1)) call assert_equal({'silent': 1, 'noremap': 1, 'script': 1, 'lhs': 'bar', diff --git a/src/testdir/test_method.vim b/src/testdir/test_method.vim --- a/src/testdir/test_method.vim +++ b/src/testdir/test_method.vim @@ -127,7 +127,7 @@ endfunc func Test_method_syntax() eval [1, 2, 3] ->sort( ) - eval [1, 2, 3] + eval [1, 2, 3] \ ->sort( \ ) eval [1, 2, 3]->sort() diff --git a/src/testdir/test_mswin_event.vim b/src/testdir/test_mswin_event.vim --- a/src/testdir/test_mswin_event.vim +++ b/src/testdir/test_mswin_event.vim @@ -43,7 +43,7 @@ func SendKeyStr(keystring) endfor endfunc -" This tells Vim to execute the buffered keys as user commands, +" This tells Vim to execute the buffered keys as user commands, " ie. same as feekdeys with mode X would do. func ExecuteBufferedKeys() if has('gui_running') @@ -158,7 +158,7 @@ let s:VK = { let s:MOD_MASK_SHIFT = 0x02 let s:MOD_MASK_CTRL = 0x04 let s:MOD_MASK_ALT = 0x08 - + let s:vim_key_modifiers = [ \ ["", 0, []], \ ["S-", 2, [s:VK.LSHIFT]], @@ -431,7 +431,7 @@ func Test_mswin_event_character_keys() " Test for lowercase 'a' to 'z', VK codes 65(0x41) - 90(0x5A) " Note: VK_A-VK_Z virtual key codes coincide with uppercase ASCII codes A-Z. " eg VK_A is 65, and the ASCII character code for uppercase 'A' is also 65. -" Caution: these are interpreted as lowercase when Shift is NOT pressed. +" Caution: these are interpreted as lowercase when Shift is NOT pressed. " eg, sending VK_A (65) 'A' Key code without shift modifier, will produce ASCII " char 'a' (91) as the output. The ASCII codes for the lowercase letters are " numbered 32 higher than their uppercase versions. @@ -808,7 +808,7 @@ func Test_mswin_event_mouse() call MouseShiftWheelDown(2, 1) call feedkeys("H", 'Lx!') " should scroll from where it is (4) + visible buffer height - cmdheight - let shift_scroll_height = line('w$') - line('w0') - &cmdheight + let shift_scroll_height = line('w$') - line('w0') - &cmdheight call assert_equal(4 + shift_scroll_height, line('.')) " Shift Scroll Up @@ -821,7 +821,7 @@ func Test_mswin_event_mouse() call MSWinMouseEvent(0x100, 2, 1, 0, 0, 0x04) call feedkeys("H", 'Lx!') " should scroll from where it is (4) + visible buffer height - cmdheight - let shift_scroll_height = line('w$') - line('w0') - &cmdheight + let shift_scroll_height = line('w$') - line('w0') - &cmdheight call assert_equal(4 + shift_scroll_height, line('.')) " Shift Scroll Up (using MOD) @@ -854,7 +854,7 @@ func Test_mswin_event_mouse() call feedkeys('g0', 'Lx!') " should scroll from where it is (7) + window width call assert_equal(7 + winwidth(0), col('.')) - + " Shift Scroll Left call MouseShiftWheelLeft(1, 50) call feedkeys('g0', 'Lx!') @@ -880,8 +880,8 @@ func Test_mswin_event_mouse() \ substitute(e, '[<>]', '', 'g') .. '")' endfor - " Test various mouse buttons - "(0 - Left, 1 - Middle, 2 - Right, + " Test various mouse buttons + "(0 - Left, 1 - Middle, 2 - Right, " 0x300 - MOUSE_X1/FROM_LEFT_3RD_BUTTON, " 0x400 - MOUSE_X2/FROM_LEFT_4TH_BUTTON) for button in [0, 1, 2, 0x300, 0x400] @@ -971,10 +971,10 @@ func Test_mswin_event_error_handling() let args = #{button: 0, row: 2, col: 4, move: 0, multiclick: 0, modifiers: 0} call assert_fails("call test_mswin_event('a1b2c3', args)", 'E475:') call assert_fails("call test_mswin_event(test_null_string(), {})", 'E475:') - + call assert_fails("call test_mswin_event([], args)", 'E1174:') call assert_fails("call test_mswin_event('abc', [])", 'E1206:') - + call assert_false(test_mswin_event('mouse', test_null_dict())) let args = #{row: 2, col: 4, multiclick: 0, modifiers: 0} call assert_false(test_mswin_event('mouse', args)) 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 @@ -2209,7 +2209,7 @@ func Test_normal29_brace() a character like this: .NH End of text here - + [DATA] call assert_equal(expected, getline(1, '$')) diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -16,7 +16,7 @@ func ListMonths() if !empty(entered) let mth = filter(mth, 'v:val=~"^".entered') endif - call complete(1, mth) + call complete(1, mth) return '' endfunc @@ -74,7 +74,7 @@ func Test_popup_complete() call feedkeys("aJu\\l\", 'tx') call assert_equal(["Jul"], getline(1,2)) %d - + " any-non printable, non-white character: Add this character and " reduce number of matches call feedkeys("aJu\\l\\", 'tx') @@ -96,7 +96,7 @@ func Test_popup_complete() call feedkeys("aJ\".repeat("\",3)."\\", 'tx') call assert_equal(["J "], getline(1,2)) %d - + " - Insert one character from the current match call feedkeys("aJ\".repeat("\",4)."\\", 'tx') call assert_equal(["January "], getline(1,2)) @@ -856,7 +856,7 @@ func Test_popup_position() call term_sendkeys(buf, "jI123456789_\") call term_sendkeys(buf, "GA\") call VerifyScreenDump(buf, 'Test_popup_position_04', {'rows': 10}) - + call term_sendkeys(buf, "\u") call StopVimInTerminal(buf) endfunc diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim --- a/src/testdir/test_popupwin_textprop.vim +++ b/src/testdir/test_popupwin_textprop.vim @@ -21,7 +21,7 @@ func Test_textprop_popup() \ bufnr: bufnr('%'), \ }) let winid = popup_create('the text', #{ - \ pos: 'botleft', + \ pos: 'botleft', \ textprop: 'popupMarker', \ border: [], \ padding: [0,1,0,1], @@ -67,25 +67,25 @@ func Test_textprop_popup_corners() \ type: 'popupMarker', \ }) let winid = popup_create('bottom left', #{ - \ pos: 'botleft', + \ pos: 'botleft', \ textprop: 'popupMarker', \ textpropwin: win_getid(), \ padding: [0,1,0,1], \ }) let winid = popup_create('bottom right', #{ - \ pos: 'botright', + \ pos: 'botright', \ textprop: 'popupMarker', \ border: [], \ padding: [0,1,0,1], \ }) let winid = popup_create('top left', #{ - \ pos: 'topleft', + \ pos: 'topleft', \ textprop: 'popupMarker', \ border: [], \ padding: [0,1,0,1], \ }) let winid = popup_create('top right', #{ - \ pos: 'topright', + \ pos: 'topright', \ textprop: 'popupMarker', \ padding: [0,1,0,1], \ }) @@ -127,14 +127,14 @@ func Test_textprop_popup_offsets() \ type: 'popupMarker', \ }) let winid = popup_create('bottom left', #{ - \ pos: 'botleft', + \ pos: 'botleft', \ line: -1, \ col: 2, \ textprop: 'popupMarker', \ padding: [0,1,0,1], \ }) let winid = popup_create('bottom right', #{ - \ pos: 'botright', + \ pos: 'botright', \ line: -1, \ col: -2, \ textprop: 'popupMarker', @@ -142,7 +142,7 @@ func Test_textprop_popup_offsets() \ padding: [0,1,0,1], \ }) let winid = popup_create('top left', #{ - \ pos: 'topleft', + \ pos: 'topleft', \ line: 1, \ col: 2, \ textprop: 'popupMarker', @@ -150,7 +150,7 @@ func Test_textprop_popup_offsets() \ padding: [0,1,0,1], \ }) let winid = popup_create('top right', #{ - \ pos: 'topright', + \ pos: 'topright', \ line: 1, \ col: -2, \ textprop: 'popupMarker', 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 @@ -1211,20 +1211,20 @@ func Test_efm1() "Xtestfile", linenr 16: yet another problem Error in "Xtestfile" at line 17: x should be a dot - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17 + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17 ^ Error in "Xtestfile" at line 18: x should be a dot - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18 + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18 .............^ Error in "Xtestfile" at line 19: x should be a dot - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19 + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19 --------------^ Error in "Xtestfile" at line 20: x should be a dot - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20 - ^ + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20 + ^ Does anyone know what is the problem and how to correction it? "Xtestfile", line 21 col 9: What is the title of the quickfix window? @@ -1570,7 +1570,7 @@ func Test_efm2() failUnlessEqual raise self.failureException, \\ W:AssertionError: 34 != 33 - + -------------------------------------------------------------- Ran 27 tests in 0.063s [DATA] diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim --- a/src/testdir/test_regexp_latin.vim +++ b/src/testdir/test_regexp_latin.vim @@ -1149,7 +1149,7 @@ def Test_compare_column_matchstr() # matchstr(). enew setline(1, ['one', 'two', 'three']) - :3 + :3 :/ee bwipe! set re=1 diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim --- a/src/testdir/test_scroll_opt.vim +++ b/src/testdir/test_scroll_opt.vim @@ -271,18 +271,18 @@ func Test_smoothscroll_wrap_long_line() call term_sendkeys(buf, ":set scrolloff=1\") call term_sendkeys(buf, "10|\") call VerifyScreenDump(buf, 'Test_smooth_long_6', {}) - + " 'scrolloff' set to 1, scrolling down, cursor moves screen line up call term_sendkeys(buf, "\") call term_sendkeys(buf, "gjgj") call term_sendkeys(buf, "\") call VerifyScreenDump(buf, 'Test_smooth_long_7', {}) - + " 'scrolloff' set to 2, scrolling up, cursor moves screen line down call term_sendkeys(buf, ":set scrolloff=2\") call term_sendkeys(buf, "10|\") call VerifyScreenDump(buf, 'Test_smooth_long_8', {}) - + " 'scrolloff' set to 2, scrolling down, cursor moves screen line up call term_sendkeys(buf, "\") call term_sendkeys(buf, "gj") @@ -320,7 +320,7 @@ func Test_smoothscroll_wrap_long_line() call term_sendkeys(buf, "3Gzt") call term_sendkeys(buf, "\j") call VerifyScreenDump(buf, 'Test_smooth_long_15', {}) - + call StopVimInTerminal(buf) endfunc @@ -335,7 +335,7 @@ func Test_smoothscroll_one_long_line() call writefile(lines, 'XSmoothOneLong', 'D') let buf = RunVimInTerminal('-S XSmoothOneLong', #{rows: 6, cols: 40}) call VerifyScreenDump(buf, 'Test_smooth_one_long_1', {}) - + call term_sendkeys(buf, "\") call VerifyScreenDump(buf, 'Test_smooth_one_long_2', {}) @@ -357,7 +357,7 @@ func Test_smoothscroll_long_line_showbre call writefile(lines, 'XSmoothLongShowbreak', 'D') let buf = RunVimInTerminal('-S XSmoothLongShowbreak', #{rows: 6, cols: 40}) call VerifyScreenDump(buf, 'Test_smooth_long_showbreak_1', {}) - + call term_sendkeys(buf, "\") call VerifyScreenDump(buf, 'Test_smooth_long_showbreak_2', {}) @@ -465,7 +465,7 @@ func Test_smoothscroll_cursor_scrolloff( call NewWindow(10, 20) setl smoothscroll wrap setl scrolloff=3 - + " 120 chars are 6 screen lines call setline(1, "abcdefghijklmnopqrstABCDEFGHIJKLMNOPQRSTabcdefghijklmnopqrstABCDEFGHIJKLMNOPQRSTabcdefghijklmnopqrstABCDEFGHIJKLMNOPQRST") call setline(2, "below") diff --git a/src/testdir/test_signals.vim b/src/testdir/test_signals.vim --- a/src/testdir/test_signals.vim +++ b/src/testdir/test_signals.vim @@ -133,7 +133,7 @@ func Test_signal_TSTP() sleep 100m " We resume after the suspend. Sleep a bit for the signal to take effect, - " also when running under valgrind. + " also when running under valgrind. exe 'silent !kill -s CONT ' .. pid_vim call WaitForAssert({-> assert_true(filereadable('XautoOut2'))}) sleep 10m diff --git a/src/testdir/test_signs.vim b/src/testdir/test_signs.vim --- a/src/testdir/test_signs.vim +++ b/src/testdir/test_signs.vim @@ -1775,10 +1775,10 @@ func Test_sign_cursor_position() let lines =<< trim END call setline(1, [repeat('x', 75), 'mmmm', 'yyyy']) call cursor(2,1) - sign define s1 texthl=Search text==> - sign define s2 linehl=Pmenu + sign define s1 texthl=Search text==> + sign define s2 linehl=Pmenu redraw - sign place 10 line=2 name=s1 + sign place 10 line=2 name=s1 END call writefile(lines, 'XtestSigncolumn', 'D') let buf = RunVimInTerminal('-S XtestSigncolumn', {'rows': 6}) diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim --- a/src/testdir/test_statusline.vim +++ b/src/testdir/test_statusline.vim @@ -413,7 +413,7 @@ func Test_statusline() " Test statusline works with 80+ items function! StatusLabel() redrawstatus - return '[label]' + return '[label]' endfunc let statusline = '%{StatusLabel()}' for i in range(150) diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim --- a/src/testdir/test_substitute.vim +++ b/src/testdir/test_substitute.vim @@ -707,7 +707,7 @@ func Test_sub_highlight_zero_match() endfunc func Test_nocatch_sub_failure_handling() - " normal error results in all replacements + " normal error results in all replacements func Foo() foobar endfunc diff --git a/src/testdir/test_tagfunc.vim b/src/testdir/test_tagfunc.vim --- a/src/testdir/test_tagfunc.vim +++ b/src/testdir/test_tagfunc.vim @@ -93,7 +93,7 @@ func Test_tagfunc() delf NullTagFunc bwipe! - set tags& tfu& cpt& + set tags& tfu& cpt& call delete('Xfile1') endfunc diff --git a/src/testdir/test_tagjump.vim b/src/testdir/test_tagjump.vim --- a/src/testdir/test_tagjump.vim +++ b/src/testdir/test_tagjump.vim @@ -743,7 +743,7 @@ func Test_tag_guess() let code =<< trim [CODE] int FUNC1 (int x) { } - int + int func2 (int y) { } int * func3 () { } 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 @@ -894,7 +894,7 @@ func Test_term_mouse_multiple_clicks_to_ let save_term = &term let save_ttymouse = &ttymouse call test_override('no_query_mouse', 1) - + " 'mousetime' must be sufficiently large, or else the test is flaky when " using a ssh connection with X forwarding; i.e. ssh -X (issue #7563). set mouse=a term=xterm mousetime=600 diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2745,7 +2745,7 @@ func Test_prop_with_text_below_after_emp let lines =<< trim END vim9script - + setline(1, ['vim9script', '', 'three', '']) # Add text prop below empty line 2 with padding. @@ -2768,13 +2768,13 @@ func Test_prop_with_text_below_after_emp END call writefile(lines, 'XscriptPropBelowAfterEmpty', 'D') let buf = RunVimInTerminal('-S XscriptPropBelowAfterEmpty', #{rows: 8, cols: 60}) - call VerifyScreenDump(buf, 'Test_prop_below_after_empty_1', {}) + call VerifyScreenDump(buf, 'Test_prop_below_after_empty_1', {}) call term_sendkeys(buf, ":set number\") - call VerifyScreenDump(buf, 'Test_prop_below_after_empty_2', {}) + call VerifyScreenDump(buf, 'Test_prop_below_after_empty_2', {}) call term_sendkeys(buf, ":set nowrap\") - call VerifyScreenDump(buf, 'Test_prop_below_after_empty_3', {}) + call VerifyScreenDump(buf, 'Test_prop_below_after_empty_3', {}) call StopVimInTerminal(buf) endfunc @@ -3310,7 +3310,7 @@ func Test_insert_text_start_incl() prop_type_add('propnotincl', {highlight: 'NonText', start_incl: false}) prop_add(1, 15, {type: 'propnotincl', text: 'before '}) - set cindent sw=4 + set cindent sw=4 prop_type_add('argname', {highlight: 'DiffChange', start_incl: true}) prop_add(3, 10, {type: 'argname', text: 'arg: '}) END @@ -3751,7 +3751,7 @@ func Test_text_prop_diff_mode() call StopVimInTerminal(buf) endfunc - + func Test_error_when_using_negative_id() call prop_type_add('test1', #{highlight: 'ErrorMsg'}) call prop_add(1, 1, #{type: 'test1', text: 'virtual'}) diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -393,7 +393,7 @@ endfunc " vgetc(). func Test_nocatch_timer_garbage_collect() " FIXME: why does this fail only on MacOS M1? - try + try CheckNotMacM1 catch /Skipped/ let g:skipped_reason = v:exception diff --git a/src/testdir/test_true_false.vim b/src/testdir/test_true_false.vim --- a/src/testdir/test_true_false.vim +++ b/src/testdir/test_true_false.vim @@ -47,11 +47,11 @@ func Test_if() endfunc function Try_arg_true_false(expr, false_val, true_val) - for v in ['v:false', '0', '"0"', '"foo"', '" "'] + for v in ['v:false', '0', '"0"', '"foo"', '" "'] let r = eval(substitute(a:expr, '%v%', v, '')) call assert_equal(a:false_val, r, 'result for ' . v . ' is not ' . string(a:false_val) . ' but ' . string(r)) endfor - for v in ['v:true', '1', '"1"', '"1foo"'] + for v in ['v:true', '1', '"1"', '"1foo"'] let r = eval(substitute(a:expr, '%v%', v, '')) call assert_equal(a:true_val, r, 'result for ' . v . ' is not ' . string(a:true_val) . ' but ' . string(r)) endfor @@ -115,11 +115,11 @@ func Test_true_false_arg() endfunc function Try_arg_non_zero(expr, false_val, true_val) - for v in ['v:false', '0', '[1]', '{2:3}', '3.4'] + for v in ['v:false', '0', '[1]', '{2:3}', '3.4'] let r = eval(substitute(a:expr, '%v%', v, '')) call assert_equal(a:false_val, r, 'result for ' . v . ' is not ' . a:false_val . ' but ' . r) endfor - for v in ['v:true', '1', '" "', '"0"'] + for v in ['v:true', '1', '" "', '"0"'] let r = eval(substitute(a:expr, '%v%', v, '')) call assert_equal(a:true_val, r, 'result for ' . v . ' is not ' . a:true_val . ' but ' . r) endfor @@ -135,14 +135,14 @@ func Test_non_zero_arg() call Try_arg_non_zero("shellescape('foo%', %v%)", "'foo%'", "'foo\\%'") " visualmode() needs to be called twice to check - for v in [v:false, 0, [1], {2:3}, 3.4] + for v in [v:false, 0, [1], {2:3}, 3.4] normal vv let r = visualmode(v) call assert_equal('v', r, 'result for ' . string(v) . ' is not "v" but ' . r) let r = visualmode(v) call assert_equal('v', r, 'result for ' . string(v) . ' is not "v" but ' . r) endfor - for v in [v:true, 1, " ", "0"] + for v in [v:true, 1, " ", "0"] normal vv let r = visualmode(v) call assert_equal('v', r, 'result for ' . v . ' is not "v" but ' . r) diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim --- a/src/testdir/test_utf8.vim +++ b/src/testdir/test_utf8.vim @@ -1,5 +1,5 @@ " Tests for Unicode manipulations - + source check.vim source view_util.vim source screendump.vim @@ -107,7 +107,7 @@ func Test_list2str_str2list_latin1() let save_encoding = &encoding set encoding=latin1 - + let lres = str2list(s, 1) let sres = list2str(l, 1) call assert_equal([65, 66, 67], str2list("ABC")) @@ -123,7 +123,7 @@ endfunc func Test_screenchar_utf8() new - " 1-cell, with composing characters + " 1-cell, with composing characters call setline(1, ["ABC\u0308"]) redraw call assert_equal([0x0041], screenchars(1, 1)) @@ -133,7 +133,7 @@ func Test_screenchar_utf8() call assert_equal("B", screenstring(1, 2)) call assert_equal("C\u0308", screenstring(1, 3)) - " 2-cells, with composing characters + " 2-cells, with composing characters let text = "\u3042\u3044\u3046\u3099" call setline(1, text) redraw diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim --- a/src/testdir/test_vim9_assign.vim +++ b/src/testdir/test_vim9_assign.vim @@ -1833,7 +1833,7 @@ def Test_assign_lambda() v9.CheckDefAndScriptFailure(lines, 'E1012: Type mismatch; expected func(number) but got func(any): bool') lines =<< trim END - echo filter([1, 2, 3], (_, v: string) => v + 1) + echo filter([1, 2, 3], (_, v: string) => v + 1) END v9.CheckDefAndScriptFailure(lines, 'E1051:') enddef @@ -1935,7 +1935,7 @@ def Test_var_func_call() endif return 'this' endfunc - var val: string = GetValue() + var val: string = GetValue() # env var is always a string var env = $TERM END diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim --- a/src/testdir/test_vim9_class.vim +++ b/src/testdir/test_vim9_class.vim @@ -48,7 +48,7 @@ def Test_class_basic() lines =<< trim END vim9script class Something - endclass school's out + endclass school's out END v9.CheckScriptFailure(lines, 'E488:') @@ -623,7 +623,7 @@ def Test_class_member() TextPos.AddToCounter(3) assert_equal(3, TextPos.counter) assert_fails('echo TextPos.noSuchMember', 'E1338:') - + def GetCounter(): number return TextPos.counter enddef diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim --- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -2085,7 +2085,7 @@ def Test_disassemble_return_bool() '8 COND2BOOL\_s*' .. '9 STORE $3\_s*' .. 'return name\_s*' .. - '\d\+ LOAD $3\_s*' .. + '\d\+ LOAD $3\_s*' .. '\d\+ RETURN', instr) assert_equal(true, InvertBool()) diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -44,7 +44,7 @@ def Test_expr1_ternary() echo ['a'] + (1 ? ['b'] : ['c'] # comment ) - # with constant condition expression is not evaluated + # with constant condition expression is not evaluated assert_equal('one', 1 ? 'one' : xxx) var Some: func = function('len') @@ -74,7 +74,7 @@ def Test_expr1_ternary_vimscript() # check line continuation var lines =<< trim END var name = 1 - ? 'yes' + ? 'yes' : 'no' assert_equal('yes', name) END @@ -82,7 +82,7 @@ def Test_expr1_ternary_vimscript() lines =<< trim END var name = v:false - ? 'yes' + ? 'yes' : 'no' assert_equal('no', name) END @@ -90,7 +90,7 @@ def Test_expr1_ternary_vimscript() lines =<< trim END var name = v:false ? - 'yes' : + 'yes' : 'no' assert_equal('no', name) END @@ -98,7 +98,7 @@ def Test_expr1_ternary_vimscript() lines =<< trim END var name = v:false ? # comment - 'yes' : + 'yes' : # comment 'no' # comment assert_equal('no', name) @@ -317,22 +317,22 @@ def Test_expr2_vimscript() # check line continuation var lines =<< trim END var name = 0 - || 1 + || 1 assert_equal(true, name) END v9.CheckDefAndScriptSuccess(lines) lines =<< trim END var name = v:false - || v:true - || v:false + || v:true + || v:false assert_equal(v:true, name) END v9.CheckDefAndScriptSuccess(lines) lines =<< trim END var name = v:false || - v:true || + v:true || v:false assert_equal(v:true, name) END @@ -341,7 +341,7 @@ def Test_expr2_vimscript() lines =<< trim END var name = v:false || # comment # comment - v:true || + v:true || # comment v:false # comment assert_equal(v:true, name) @@ -456,23 +456,23 @@ def Test_expr3_vimscript() # check line continuation var lines =<< trim END var name = 0 - && 1 + && 1 assert_equal(false, name) END v9.CheckDefAndScriptSuccess(lines) lines =<< trim END var name = v:true - && v:true - && v:true + && v:true + && v:true assert_equal(v:true, name) END v9.CheckDefAndScriptSuccess(lines) lines =<< trim END var name = v:true && - v:true && - v:true + v:true && + v:true assert_equal(v:true, name) END v9.CheckDefAndScriptSuccess(lines) @@ -480,9 +480,9 @@ def Test_expr3_vimscript() lines =<< trim END var name = v:true && # comment # comment - v:true && + v:true && # comment - v:true + v:true assert_equal(v:true, name) END v9.CheckDefAndScriptSuccess(lines) @@ -887,7 +887,7 @@ def Test_expr4_compare_null() # variables declared at script level used in a :def function lines =<< trim END vim9script - + var l_decl: list var l_empty = [] var l_null = null_list @@ -914,7 +914,7 @@ def Test_expr4_compare_null() assert_true(caught) enddef TestList() - + var b_decl: blob var b_empty = 0z var b_null = null_blob @@ -941,7 +941,7 @@ def Test_expr4_compare_null() assert_true(caught) enddef TestBlob() - + var d_decl: dict var d_empty = {} var d_null = null_dict @@ -1274,7 +1274,7 @@ def Test_expr4_vim9script() # check line continuation var lines =<< trim END var name = 0 - < 1 + < 1 assert_equal(true, name) END v9.CheckDefAndScriptSuccess(lines) @@ -1282,14 +1282,14 @@ def Test_expr4_vim9script() lines =<< trim END var name = 123 # comment - != 123 + != 123 assert_equal(false, name) END v9.CheckDefAndScriptSuccess(lines) lines =<< trim END var name = 123 == - 123 + 123 assert_equal(true, name) END v9.CheckDefAndScriptSuccess(lines) @@ -1297,7 +1297,7 @@ def Test_expr4_vim9script() lines =<< trim END var list = [1, 2, 3] var name = list - is list + is list assert_equal(true, name) END v9.CheckDefAndScriptSuccess(lines) @@ -1306,7 +1306,7 @@ def Test_expr4_vim9script() var list = [1, 2, 3] var name = list # comment # comment - is list + is list assert_equal(true, name) END v9.CheckDefAndScriptSuccess(lines) @@ -1314,7 +1314,7 @@ def Test_expr4_vim9script() lines =<< trim END var myblob = 0z1234 var name = myblob - isnot 0z11 + isnot 0z11 assert_equal(true, name) END v9.CheckDefAndScriptSuccess(lines) @@ -1526,7 +1526,7 @@ def Test_expr6_vim9script() # check line continuation var lines =<< trim END var name = 11 - + 77 + + 77 - 22 assert_equal(66, name) END @@ -1551,7 +1551,7 @@ def Test_expr6_vim9script() lines =<< trim END var name = 'one' - .. 'two' + .. 'two' assert_equal('onetwo', name) END v9.CheckDefAndScriptSuccess(lines) @@ -1859,7 +1859,7 @@ def Test_expr7_vim9script() # check line continuation var lines =<< trim END var name = 11 - * 22 + * 22 / 3 assert_equal(80, name) END @@ -1867,7 +1867,7 @@ def Test_expr7_vim9script() lines =<< trim END var name = 25 - % 10 + % 10 assert_equal(5, name) END v9.CheckDefAndScriptSuccess(lines) @@ -1877,14 +1877,14 @@ def Test_expr7_vim9script() # comment # comment - % 10 + % 10 assert_equal(5, name) END v9.CheckDefAndScriptSuccess(lines) lines =<< trim END var name = 11 * - 22 / + 22 / 3 assert_equal(80, name) END @@ -2775,7 +2775,7 @@ def Test_expr9_dict() var dkeys = {['key']: 'string', [12]: 'numberexpr', 34: 'number', - [true]: 'bool'} + [true]: 'bool'} assert_equal('string', dkeys['key']) assert_equal('numberexpr', dkeys[12]) assert_equal('number', dkeys[34]) @@ -2798,7 +2798,7 @@ def Test_expr9_dict() assert_equal('dict>', typename(dl)) END v9.CheckDefAndScriptSuccess(lines) - + # legacy syntax doesn't work v9.CheckDefAndScriptFailure(["var x = #{key: 8}"], 'E1170:', 1) v9.CheckDefAndScriptFailure(["var x = 'a' #{a: 1}"], 'E1170:', 1) @@ -3206,7 +3206,7 @@ enddef def Test_expr_member_vim9script() var lines =<< trim END var d = {one: - 'one', + 'one', two: 'two', 1: 1, _: 2} @@ -3494,19 +3494,19 @@ def Test_expr9_legacy_script() assert_equal('ok', g:LegacyReturn()) lines =<< trim END - vim9script - def GetNumber(): number + vim9script + def GetNumber(): number legacy return notexists - enddef + enddef echo GetNumber() END v9.CheckScriptFailure(lines, 'E121: Undefined variable: notexists') lines =<< trim END - vim9script - def GetNumber(): number - legacy return range(3)->map('v:val + 1') - enddef + vim9script + def GetNumber(): number + legacy return range(3)->map('v:val + 1') + enddef echo GetNumber() END v9.CheckScriptFailure(lines, 'E1012: Type mismatch; expected number but got list') @@ -3631,7 +3631,7 @@ def Test_expr9_method_call() var Join = (l) => join(l, 'x') assert_equal('axb', ['a', 'b']->(Join)()) - + var sorted = [3, 1, 2] -> sort() assert_equal([1, 2, 3], sorted) diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim index 44a8d4b106532168bc50cb3c5058df8b641c5a62..f9ff3bc3e6c1c5a4c2d26bb333bb6f823678b88c GIT binary patch literal 104198 zc%1EhYj+zrlIZ=cUxCoOX)>l{k&-Q&8!O}3RyI3{J!?CUdt@z7lWa*Hlii%|rbNZ# z``d3l05pI`lTAuaX7^s5nOJH7g+ieK6bkidiFZ+6h^sJ*(?u@Ad>)O9T%_lsxQxWl z@$8An$5}it#57DU7U4y-x3iO{i)bXCX3me>hGK{k}=^poJ8ltQJBZ$c4tQj_)EM^XVD3i zw>txo7g?NKK!FfhR4lSY1UFG0zz2W^mEo6hIGq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@XIj#PC>i26|2jtuw6d;X--%_{(S&03JwilaI{b)sM1unOMPI@TcM@sVjeH#^YIG z*T_II6SUM!X$|3OO|eaD*g}Ce15xBpAB+6@X&;81!++suguM(SY!=r~AMcCv$?WMY K%s#+z_J0A-!q5r; diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim --- a/src/testdir/test_vim9_import.vim +++ b/src/testdir/test_vim9_import.vim @@ -2656,7 +2656,7 @@ def Test_autoload_mapping() import autoload 'toggle.vim' - nnoremap tt toggle.Toggle() + nnoremap tt toggle.Toggle() nnoremap xx toggle.Doit() nnoremap yy toggle.Doit() END 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 @@ -301,7 +301,7 @@ func Test_cmdline_history_order() call test_settime(39) call histadd(':', "echo '39'") wviminfo Xviminfo - + call histdel(':') rviminfo Xviminfo call assert_equal("echo '39'", histget(':', -1)) @@ -560,7 +560,7 @@ func Test_viminfo_encoding() sp Xviminfo call assert_equal('latin1', &fenc) close - + call histdel(':') rviminfo Xviminfo call assert_equal("echo 'é'", histget(':', -1)) diff --git a/src/testdir/test_virtualedit.vim b/src/testdir/test_virtualedit.vim --- a/src/testdir/test_virtualedit.vim +++ b/src/testdir/test_virtualedit.vim @@ -585,14 +585,14 @@ func Test_virtualedit_mouse() set virtualedit& endfunc -" this was replacing the NUL at the end of the line +" this was replacing the NUL at the end of the line func Test_virtualedit_replace_after_tab() new s/\v/ 0 set ve=all let @" = '' sil! norm vPvr0 - + call assert_equal("\t0", getline(1)) set ve& bwipe! diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -1167,8 +1167,8 @@ endfunc func Test_visual_put_in_block_using_zp() new " paste using zP - call setline(1, ['/path;text', '/path;text', '/path;text', '', - \ '/subdir', + call setline(1, ['/path;text', '/path;text', '/path;text', '', + \ '/subdir', \ '/longsubdir', \ '/longlongsubdir']) exe "normal! 5G\2j$y" @@ -1176,8 +1176,8 @@ func Test_visual_put_in_block_using_zp() call assert_equal(['/path/subdir;text', '/path/longsubdir;text', '/path/longlongsubdir;text'], getline(1, 3)) %d " paste using zP - call setline(1, ['/path;text', '/path;text', '/path;text', '', - \ '/subdir', + call setline(1, ['/path;text', '/path;text', '/path;text', '', + \ '/subdir', \ '/longsubdir', \ '/longlongsubdir']) exe "normal! 5G\2j$y" @@ -1190,7 +1190,7 @@ func Test_visual_put_in_block_using_zy_a new " Test 1) Paste using zp - after the cursor without trailing spaces - call setline(1, ['/path;text', '/path;text', '/path;text', '', + call setline(1, ['/path;text', '/path;text', '/path;text', '', \ 'texttext /subdir columntext', \ 'texttext /longsubdir columntext', \ 'texttext /longlongsubdir columntext']) @@ -1200,7 +1200,7 @@ func Test_visual_put_in_block_using_zy_a " Test 2) Paste using zP - in front of the cursor without trailing spaces %d - call setline(1, ['/path;text', '/path;text', '/path;text', '', + call setline(1, ['/path;text', '/path;text', '/path;text', '', \ 'texttext /subdir columntext', \ 'texttext /longsubdir columntext', \ 'texttext /longlongsubdir columntext']) @@ -1210,7 +1210,7 @@ func Test_visual_put_in_block_using_zy_a " Test 3) Paste using p - with trailing spaces %d - call setline(1, ['/path;text', '/path;text', '/path;text', '', + call setline(1, ['/path;text', '/path;text', '/path;text', '', \ 'texttext /subdir columntext', \ 'texttext /longsubdir columntext', \ 'texttext /longlongsubdir columntext']) @@ -1220,7 +1220,7 @@ func Test_visual_put_in_block_using_zy_a " Test 4) Paste using P - with trailing spaces %d - call setline(1, ['/path;text', '/path;text', '/path;text', '', + call setline(1, ['/path;text', '/path;text', '/path;text', '', \ 'texttext /subdir columntext', \ 'texttext /longsubdir columntext', \ 'texttext /longlongsubdir columntext']) @@ -1230,7 +1230,7 @@ func Test_visual_put_in_block_using_zy_a " Test 5) Yank with spaces inside the block %d - call setline(1, ['/path;text', '/path;text', '/path;text', '', + call setline(1, ['/path;text', '/path;text', '/path;text', '', \ 'texttext /sub dir/ columntext', \ 'texttext /lon gsubdir/ columntext', \ 'texttext /lon glongsubdir/ columntext']) diff --git a/src/testdir/test_winbuf_close.vim b/src/testdir/test_winbuf_close.vim --- a/src/testdir/test_winbuf_close.vim +++ b/src/testdir/test_winbuf_close.vim @@ -219,7 +219,7 @@ func Test_window_close_splitright_noequa execute "normal \b" let h = winheight(0) let w = win_getid() - new + new q call assert_equal(h, winheight(0), "Window height does not match eight before opening and closing another window") call assert_equal(w, win_getid(), "Did not return to original window after opening and closing a window") diff --git a/src/testdir/test_xxd.vim b/src/testdir/test_xxd.vim --- a/src/testdir/test_xxd.vim +++ b/src/testdir/test_xxd.vim @@ -232,7 +232,7 @@ func Test_xxd() }; unsigned int varName_len = 11; [CODE] - + call assert_equal(expected, getline(1,'$'), s:Mess(s:test)) endfor @@ -289,7 +289,7 @@ func Test_xxd_patch() exe cmd1 exe cmd2 call assert_equal(['00000000: 3a 3a 45 45 3a 3a 3a 3a 46 46 ::EE::::FF'], readfile('Xxxdout')) - + call writefile(["2: 41 41", "08: 42 42"], 'Xxxdin') call writefile(['::::::::'], 'Xxxdfile') exe cmd1 @@ -305,7 +305,7 @@ func Test_xxd_patch() exe cmd1 exe cmd2 call assert_equal(['00000000: 3a 3a 45 45 3a 3a 3a 3a 42 44 46 46 ::EE::::BDFF'], readfile('Xxxdout')) - + call delete('Xxxdout') endfunc diff --git a/src/testdir/unix.vim b/src/testdir/unix.vim --- a/src/testdir/unix.vim +++ b/src/testdir/unix.vim @@ -2,7 +2,7 @@ " Always use "sh", don't use the value of "$SHELL". set shell=sh -" Only when the +eval feature is present. +" Only when the +eval feature is present. if 1 " While some tests overwrite $HOME to prevent them from polluting user files, " we need to remember the original value so that we can tell external systems diff --git a/src/testdir/vim9.vim b/src/testdir/vim9.vim --- a/src/testdir/vim9.vim +++ b/src/testdir/vim9.vim @@ -195,14 +195,14 @@ endfunc # CheckLegacyAndVim9Success() export def CheckTransLegacySuccess(lines: list) var legacylines = lines->mapnew((_, v) => - v->substitute('\', 'let', 'g') - ->substitute('\', 'let', 'g') - ->substitute('\', '{', 'g') - ->substitute('\', '->', 'g') + v->substitute('\', 'let', 'g') + ->substitute('\', 'let', 'g') + ->substitute('\', '{', 'g') + ->substitute('\', '->', 'g') ->substitute('\', '}', 'g') ->substitute('\', '1', 'g') ->substitute('\', '0', 'g') - ->substitute('#"', ' "', 'g')) + ->substitute('#"', ' "', 'g')) CheckLegacySuccess(legacylines) enddef @@ -262,14 +262,14 @@ export def CheckLegacyAndVim9Failure(lin endif var legacylines = lines->mapnew((_, v) => - v->substitute('\', 'let', 'g') - ->substitute('\', 'let', 'g') - ->substitute('#"', ' "', 'g')) + v->substitute('\', 'let', 'g') + ->substitute('\', 'let', 'g') + ->substitute('#"', ' "', 'g')) CheckLegacyFailure(legacylines, legacyError) var vim9lines = lines->mapnew((_, v) => - v->substitute('\', 'var', 'g') - ->substitute('\substitute('\', 'var', 'g') + ->substitute('\