]> granicus.if.org Git - vim/commitdiff
patch 9.0.1257: code style is not check in test scripts v9.0.1257
authorBram Moolenaar <Bram@vim.org>
Sat, 28 Jan 2023 19:19:03 +0000 (19:19 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 28 Jan 2023 19:19:03 +0000 (19:19 +0000)
Problem:    Code style is not check in test scripts.
Solution:   Add basic code style check for test files.

56 files changed:
src/testdir/keycode_check.vim
src/testdir/runtest.vim
src/testdir/setup.vim
src/testdir/summarize.vim
src/testdir/test_assert.vim
src/testdir/test_autocmd.vim
src/testdir/test_blob.vim
src/testdir/test_blockedit.vim
src/testdir/test_channel.vim
src/testdir/test_cmd_lists.vim
src/testdir/test_codestyle.vim
src/testdir/test_diffmode.vim
src/testdir/test_edit.vim
src/testdir/test_expand.vim
src/testdir/test_expand_dllpath.vim
src/testdir/test_expand_func.vim
src/testdir/test_fold.vim
src/testdir/test_goto.vim
src/testdir/test_increment.vim
src/testdir/test_indent.vim
src/testdir/test_ins_complete.vim
src/testdir/test_listchars.vim
src/testdir/test_map_functions.vim
src/testdir/test_method.vim
src/testdir/test_mswin_event.vim
src/testdir/test_normal.vim
src/testdir/test_popup.vim
src/testdir/test_popupwin_textprop.vim
src/testdir/test_quickfix.vim
src/testdir/test_regexp_latin.vim
src/testdir/test_scroll_opt.vim
src/testdir/test_signals.vim
src/testdir/test_signs.vim
src/testdir/test_statusline.vim
src/testdir/test_substitute.vim
src/testdir/test_tagfunc.vim
src/testdir/test_tagjump.vim
src/testdir/test_termcodes.vim
src/testdir/test_textprop.vim
src/testdir/test_timers.vim
src/testdir/test_true_false.vim
src/testdir/test_utf8.vim
src/testdir/test_vim9_assign.vim
src/testdir/test_vim9_class.vim
src/testdir/test_vim9_disassemble.vim
src/testdir/test_vim9_expr.vim
src/testdir/test_vim9_func.vim
src/testdir/test_vim9_import.vim
src/testdir/test_viminfo.vim
src/testdir/test_virtualedit.vim
src/testdir/test_visual.vim
src/testdir/test_winbuf_close.vim
src/testdir/test_xxd.vim
src/testdir/unix.vim
src/testdir/vim9.vim
src/version.c

index 6ad7b773bb5bd7d6689aa86f51480ec87a86a672..8320341d2f3c6eb47bac8e6e7e2fc6499871899d 100644 (file)
@@ -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',
index 5fe391b8f305317de3b5990c2624017b00c64836..1cdeeef5aaa195e7355aaffafea88b9f9e19e97a 100644 (file)
@@ -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
index 5b8f3f110421aacb904c104a072d883df8cb62fa..ca94bae275aa122729e980aac318dcaa08deb701 100644 (file)
@@ -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 == ''
index da5856a2e714385aa32b3555a5e88ebe47281f63..d0d4e00b2c16ba54b3502552b56c8b37bf3b544e 100644 (file)
@@ -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, [
index 8222d0c06fe0ba7892bb8172a84d3ed6fe91edfa..ecf5024fdb1c99fd70370319f9482d13d10c6935 100644 (file)
@@ -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, '')
index 12fbcb7ad7a467a485b053880604d3cfaeb3926d..8931678d74ed30728af3128b96d7bb1e4457cc50 100644 (file)
@@ -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\<C-V>", '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("<abuf>") 
+  auto BufReadPre * exe "sbuf " .. expand("<abuf>")
   " Avoid the "W11" prompt
   au FileChangedShell * let v:fcs_choice = 'reload'
   func Xautocmd_changelist()
index 4a957aa7216811ea0945e441b1d08f970a7d430d..cccecb7611dc0f7bc0d6bcc88086df9530e7c012 100644 (file)
@@ -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)
index 8497efb083d4f1e4704586f937bd91dbba0ad1aa..71f687b7c2cd15ab60930e200a3c0f22b7426a28 100644 (file)
@@ -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,
       }
index 438db8e19692d6a86b31b5a6c98ae5d034e4b779..a6b25c9a7805f46cdd404d946c21fbe8f5d636e7 100644 (file)
@@ -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))
index 8a7d54fe6cb8e122dd5ca60f0e00bee37e0524c3..77ae85ea2c3de984c9066818956bdd648139526c 100644 (file)
@@ -50,7 +50,7 @@ func Test_cmd_lists()
           \ 'interface',
           \ 'public',
           \ 'static',
-          \ 'this', 
+          \ 'this',
           \ 'type',
           \ '++',
           \ '--',
index beb4a6818d1138fc4f44629a16cf133d01294aaf..c643ff2e84602f0f218850717c5bc715d00a9fb8 100644 (file)
@@ -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
index 9308d0492b719e2888976146d4720333999e4b8a..d9ffbb379823f2aa879717dea6894804ebdc0511 100644 (file)
@@ -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
index ec824b077a2b566f0fbf74030176234cdb54feac..9caa93128af0cef255a0e0a9186012274c2786f4 100644 (file)
@@ -2072,7 +2072,7 @@ func Test_edit_overlong_file_name()
   file %%%%%%%%%%%%%%%%%%%%%%%%%%
   file %%%%%%
   set readonly
-  set ls=2 
+  set ls=2
 
   redraw!
   set noreadonly ls&
index c1140aaabb182b8a36723c896f5939f3103fe900..d7c393a04e6efded01829310e15aa9bc9e66d95a 100644 (file)
@@ -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
 
index 76bd787ad8081c7a502e54255e1cb28ff9f56d84..8e489724bde1a43bcfa562933f435d6f2e204fc1 100644 (file)
@@ -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 = ''
index c9e802a1e0b142006e243ef3319e8aef58917a83..112809ab2d9c60c06e6225ae5c1c934cf6f7c068 100644 (file)
@@ -7,15 +7,15 @@ let s:slnum = str2nr(expand('<slnum>'))
 let s:sflnum = str2nr(expand('<sflnum>'))
 
 func s:expand_sfile()
-  return expand('<sfile>')  
+  return expand('<sfile>')
 endfunc
 
 func s:expand_slnum()
-  return str2nr(expand('<slnum>'))  
+  return str2nr(expand('<slnum>'))
 endfunc
 
 func s:expand_sflnum()
-  return str2nr(expand('<sflnum>'))  
+  return str2nr(expand('<sflnum>'))
 endfunc
 
 " This test depends on the location in the test file, put it first.
index a0291a0ab32c8d52af0f8ea9a5914b5f4a34d482..a35ea1e3b8a3f0828b1beee70ab28464ca2171b3 100644 (file)
@@ -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) {
index c74a02144699e2ffdf5430c828461e1c196b3b5c..85c156ac7ace9b6d6c1b2ff40b4ced4683e188d7 100644 (file)
@@ -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]
index beacb0a44e50edb341af379ba582ab6c027a7402..c367f2bab585588055a73529b653c9d4fd0c860e 100644 (file)
@@ -704,7 +704,7 @@ endfunc
 " Text:
 "   1 23
 "   4 56
-" 
+"
 " Expected:
 "   1) f2 Ctrl-V jl <ctrl-a>, repeat twice afterwards with .
 "   1 26
index 290855ed93b318ecec050dfcb938c537c3d20b96..96e9d2300883c9ee9eb5d30ade4500b0880b66c9 100644 (file)
@@ -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()
index 1452e4d31ba3f9bbed1e8e41d18b94bd8cb66df6..fc7e8cb0edf8b0c37ef111fbd58b9f47dbf1f8ef 100644 (file)
@@ -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\80ý 
   sil! norm o\10\18\10\18\10
 
index b9b078c0a160436e6268c978f278b2864931bd40..2f495c3ab1157f6cec4fd117ddf426dbb236e955 100644 (file)
@@ -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, [
index 13e61f207b93edbec3a07c1466a71f86ab2bdff4..a750cd79cd82cd464c6aa811b2c1cc8505594410 100644 (file)
@@ -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('<sfile>'), '<SNR>\zs\d\+\ze_SID$'))
 endfunc
 
@@ -18,7 +18,7 @@ func Test_maparg()
   call assert_equal({'silent': 0, 'noremap': 0, 'script': 0, 'lhs': 'foo<C-V>',
         \ 'lhsraw': "foo\x80\xfc\x04V", 'lhsrawalt': "foo\x16",
         \ 'mode': ' ', 'nowait': 0, 'expr': 0, 'sid': sid, 'scriptversion': 1,
-        \ 'lnum': lnum + 1, 
+        \ 'lnum': lnum + 1,
        \ 'rhs': 'is<F4>foo', 'buffer': 0, 'abbr': 0, 'mode_bits': 0x47},
        \ maparg('foo<C-V>', '', 0, 1))
   call assert_equal({'silent': 1, 'noremap': 1, 'script': 1, 'lhs': 'bar',
index 29734e049854351fd1bfbd76c8719229249ae510..2ca66fd77e4fdc02165d6de2f54024d69f5cdc29 100644 (file)
@@ -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()
index fd5143a58a5111e63b6e7944a520fb0c7909d903..e2add3b2c228e8f8e9e235c92c6cab22a45aca32 100644 (file)
@@ -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') .. '")<CR>'
   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))
index 5c920525c782ad237222143d07d0d032ef2432cd..38234cd6c7927310a9ef350f4cabd99dadcc7aca 100644 (file)
@@ -2209,7 +2209,7 @@ func Test_normal29_brace()
     a character like this:
     .NH
     End of text here
-  
+
   [DATA]
   call assert_equal(expected, getline(1, '$'))
 
index 9f727a000f97f4d016ed27671d2bf984b828305c..1401e5558c8e5600290e1e2d9a16da945152bf44 100644 (file)
@@ -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\<f5>\<c-p>l\<c-y>", '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\<f5>\<c-p>l\<c-n>\<c-y>", 'tx')
@@ -96,7 +96,7 @@ func Test_popup_complete()
   call feedkeys("aJ\<f5>".repeat("\<c-n>",3)."\<c-l>\<esc>", 'tx')
   call assert_equal(["J\f"], getline(1,2))
   %d
-  
+
   " <c-l> - Insert one character from the current match
   call feedkeys("aJ\<f5>".repeat("\<c-n>",4)."\<c-l>\<esc>", 'tx')
   call assert_equal(["January\f"], getline(1,2))
@@ -856,7 +856,7 @@ func Test_popup_position()
   call term_sendkeys(buf, "jI123456789_\<Esc>")
   call term_sendkeys(buf, "GA\<C-N>")
   call VerifyScreenDump(buf, 'Test_popup_position_04', {'rows': 10})
-  
+
   call term_sendkeys(buf, "\<Esc>u")
   call StopVimInTerminal(buf)
 endfunc
index 3472b40b898185f0abe1e72ff8195f20bc53463f..80b5a886e0d9221a1cde60d3f36a471991602ea0 100644 (file)
@@ -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',
index 68170f888d1cc8e422819ef86186028ed33aedca..bc180fc04ce8146dfdd1c6a733750963e275bef9 100644 (file)
@@ -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]
index 8df357fd4484fb2bdba58195e97a914b151f01a3..9acb12b4af3875ac2e70c0009f67f72528b0df43 100644 (file)
@@ -1149,7 +1149,7 @@ def Test_compare_column_matchstr()
   # matchstr().
   enew
   setline(1, ['one', 'two', 'three'])
-  :3 
+  :3
   :/ee
   bwipe!
   set re=1
index 58344f9a925cf13a274898615fce3f3b3d221e74..c146c018a68f2c71d52397c79b1b749e204bee3d 100644 (file)
@@ -271,18 +271,18 @@ func Test_smoothscroll_wrap_long_line()
   call term_sendkeys(buf, ":set scrolloff=1\<CR>")
   call term_sendkeys(buf, "10|\<C-E>")
   call VerifyScreenDump(buf, 'Test_smooth_long_6', {})
-  
+
   " 'scrolloff' set to 1, scrolling down, cursor moves screen line up
   call term_sendkeys(buf, "\<C-E>")
   call term_sendkeys(buf, "gjgj")
   call term_sendkeys(buf, "\<C-Y>")
   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\<CR>")
   call term_sendkeys(buf, "10|\<C-E>")
   call VerifyScreenDump(buf, 'Test_smooth_long_8', {})
-  
+
   " 'scrolloff' set to 2, scrolling down, cursor moves screen line up
   call term_sendkeys(buf, "\<C-E>")
   call term_sendkeys(buf, "gj")
@@ -320,7 +320,7 @@ func Test_smoothscroll_wrap_long_line()
   call term_sendkeys(buf, "3Gzt")
   call term_sendkeys(buf, "\<C-E>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, "\<C-E>")
   call VerifyScreenDump(buf, 'Test_smooth_one_long_2', {})
 
@@ -357,7 +357,7 @@ func Test_smoothscroll_long_line_showbreak()
   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, "\<C-E>")
   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")
index c37ea2aaf336b84dc585e3ad91158372a6f7e2de..4b6c7345ca81fc12d46e86505f29443eea70d6df 100644 (file)
@@ -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
index 76cefa21c4eb979e7f6f744f0cc333b4c58b1d6f..95e8d4486911887ffb99c36102a7a1ae7cc1782b 100644 (file)
@@ -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})
index d06e903ad927af8ea3b1fce2dd1444b45069f7af..8061d1507a82dea960b14b368c5923590888503f 100644 (file)
@@ -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)
index 4268aab03fe2d4a1b8c8808ad2113149c4dc20de..7491b6163dc8260687853f4a24cb7f671236d447 100644 (file)
@@ -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
index 4eb0f39af0646d754c7b6bca7c7e667768a75568..d3cd053f53df9c3cac6d82b5f153e55b63318e33 100644 (file)
@@ -93,7 +93,7 @@ func Test_tagfunc()
   delf NullTagFunc
 
   bwipe!
-  set tags& tfu& cpt& 
+  set tags& tfu& cpt&
   call delete('Xfile1')
 endfunc
 
index 5185b20b77aa29720f104cd3e3b3a86123111016..8b85bd62fe99c6e4ceaf32f87173c0dd1a4bac31 100644 (file)
@@ -743,7 +743,7 @@ func Test_tag_guess()
   let code =<< trim [CODE]
 
     int FUNC1  (int x) { }
-    int 
+    int
     func2   (int y) { }
     int * func3 () { }
 
index d3ab99cdb9593a567bbf3d553ad0e1e0cd009c40..8e8be02cb20ff6478f11c7a5bf30b9e6de81be3d 100644 (file)
@@ -894,7 +894,7 @@ func Test_term_mouse_multiple_clicks_to_visually_select()
   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
index 93c434f7c6c0d6c2a6687e1003066c6ddb7cf9d2..e00bad6d34f2ee8ea81d9d5e4524327abca182c0 100644 (file)
@@ -2745,7 +2745,7 @@ func Test_prop_with_text_below_after_empty()
 
   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_empty()
   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\<CR>")
-  call VerifyScreenDump(buf, 'Test_prop_below_after_empty_2', {}) 
+  call VerifyScreenDump(buf, 'Test_prop_below_after_empty_2', {})
 
   call term_sendkeys(buf, ":set nowrap\<CR>")
-  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'})
index 8e6d7f943342cf73292c5a3067038cd941b339b4..fe80bb9f211b91bd0833fc6f14d2baa2b74ec424 100644 (file)
@@ -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
index 4e95441a81635615f7a3df4bebb11fd13a894b4a..2b27ba72a12fed4a654836460b63861952d3b526 100644 (file)
@@ -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)
index 9ad7828d469dc31b1d74bd7906e78646a1985e0c..16bf60d9e00460bc554e1e6e8ea9bcf946d98e5a 100644 (file)
@@ -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
index 610a36ce4c122d881e3ad048b2f972f264a4e6de..f016ae3f799fe8657ce79d198520b8e16b9675c3 100644 (file)
@@ -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
index 3a434d1bacbf19f8e39d448fd5e57358aa8d79ff..023068c7d4f34343dce7ce4d3bf30591a0aba052 100644 (file)
@@ -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
index e47e013764d081685467c1849654c79894dc4e6c..1433bb7690dc5dbcb25c680674d2e380106b3752 100644 (file)
@@ -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())
index 29a17fe2561636b9e37303ca5aef908e88dd754b..de6393e70e9001230fc5f305f888651ad0a4aaf8 100644 (file)
@@ -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<number>
       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<number>
       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<list<unknown>>', 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<number>')
@@ -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)
index 44a8d4b106532168bc50cb3c5058df8b641c5a62..f9ff3bc3e6c1c5a4c2d26bb333bb6f823678b88c 100644 (file)
@@ -607,7 +607,7 @@ def Test_call_ufunc_failure()
       defcompile
 
       func! g:Global(a, b)
-        echo a:a a:b 
+        echo a:a a:b
       endfunc
       Tryit()
   END
@@ -2150,7 +2150,7 @@ def Test_nested_function_with_args_split()
         )
         # had a double free if the right parenthesis of the nested function is
         # on the next line
-         
+
         enddef|BBBB
       enddef
       # Compile all functions
@@ -2175,8 +2175,8 @@ def Test_error_in_function_args()
         def SecondFunction(J  =
         # Nois
         # one
-         
-         enddef|BBBB
+
+        enddef|BBBB
       enddef
       # Compile all functions
       defcompile
index 97d1cffc1c450b5459908f3e4df32063f3f9a34a..7d3691a29373b125b786339ceb7cb4a73ce886d9 100644 (file)
@@ -2656,7 +2656,7 @@ def Test_autoload_mapping()
 
       import autoload 'toggle.vim'
 
-      nnoremap <silent> <expr> tt toggle.Toggle() 
+      nnoremap <silent> <expr> tt toggle.Toggle()
       nnoremap <silent> xx <ScriptCmd>toggle.Doit()<CR>
       nnoremap <silent> yy <Cmd>toggle.Doit()<CR>
   END
index f168e15c555b3f3a0faa862a9d4aa2a1776bcdd9..0551ea1b494bdb1353d4f95598afd5466faebfcd 100644 (file)
@@ -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))
index 7ad54db2f8adca1a642fbc39c684f5d88c8e6e14..71cea427bac11eb3714b6ed30ec7ce3ab6ec284d 100644 (file)
@@ -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!
index df781a019763b44a291142d46218e58fd96b62d9..a56c28854fc59b20a020709938bec092817a2d19 100644 (file)
@@ -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\<c-v>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\<c-v>2j$y"
@@ -1190,7 +1190,7 @@ func Test_visual_put_in_block_using_zy_and_zp()
   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_and_zp()
 
   " 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_and_zp()
 
   " 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_and_zp()
 
   " 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_and_zp()
 
   " 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'])
index 17e31e49d5a8a5b23e46ba8be69819098bd0af51..5175c2c94da36e0fe0ac33cbca6f2cf6fe9e37a3 100644 (file)
@@ -219,7 +219,7 @@ func Test_window_close_splitright_noequalalways()
   execute "normal \<c-w>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")
index b79d52a511abf8b175353aa71dd69173bbf6a4a7..92a4d059988cf9497a56e6ef11ccc038fa78f04e 100644 (file)
@@ -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
 
index b82c63c3898070c048a73f923d1926a182e0b348..366c9b100cf9b43752b96a928b16177870fd2748 100644 (file)
@@ -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
index bb50db08e93d3238747eadf08b6ff3b86f119086..5877a79ef2b82851b60f17ebe0823486672e0bb4 100644 (file)
@@ -195,14 +195,14 @@ endfunc
 # CheckLegacyAndVim9Success()
 export def CheckTransLegacySuccess(lines: list<string>)
   var legacylines = lines->mapnew((_, v) =>
-                               v->substitute('\<VAR\>', 'let', 'g')
-                                ->substitute('\<LET\>', 'let', 'g')
-                                ->substitute('\<LSTART\>', '{', 'g')
-                                ->substitute('\<LMIDDLE\>', '->', 'g')
+                               v->substitute('\<VAR\>', 'let', 'g')
+                                ->substitute('\<LET\>', 'let', 'g')
+                                ->substitute('\<LSTART\>', '{', 'g')
+                                ->substitute('\<LMIDDLE\>', '->', 'g')
                                 ->substitute('\<LEND\>', '}', 'g')
                                 ->substitute('\<TRUE\>', '1', 'g')
                                 ->substitute('\<FALSE\>', '0', 'g')
-                                ->substitute('#"', ' "', 'g'))
+                                ->substitute('#"', ' "', 'g'))
   CheckLegacySuccess(legacylines)
 enddef
 
@@ -262,14 +262,14 @@ export def CheckLegacyAndVim9Failure(lines: list<string>, error: any)
   endif
 
   var legacylines = lines->mapnew((_, v) =>
-                               v->substitute('\<VAR\>', 'let', 'g')
-                                ->substitute('\<LET\>', 'let', 'g')
-                                ->substitute('#"', ' "', 'g'))
+                               v->substitute('\<VAR\>', 'let', 'g')
+                                ->substitute('\<LET\>', 'let', 'g')
+                                ->substitute('#"', ' "', 'g'))
   CheckLegacyFailure(legacylines, legacyError)
 
   var vim9lines = lines->mapnew((_, v) =>
-                               v->substitute('\<VAR\>', 'var', 'g')
-                                ->substitute('\<LET ', '', 'g'))
+                               v->substitute('\<VAR\>', 'var', 'g')
+                                ->substitute('\<LET ', '', 'g'))
   CheckDefExecFailure(vim9lines, defError)
   CheckScriptFailure(['vim9script'] + vim9lines, scriptError)
 enddef
index eb317fb651b633259a2a1c35325c14acf2edea99..828ccaecec87064a9a465d53522e65a8b12e59d9 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1257,
 /**/
     1256,
 /**/