Patch 8.2.3113
Patch 8.2.3113 Problem:No error when for loop variable shadows script variable. Solution: Check for the error. (closes #8512) Files: src/eval.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.3112/src/eval.c 2021-07-05 21:41:44.782616398 +0200 --- src/eval.c 2021-07-05 22:20:09.330040863 +0200 *** *** 1777,1783 forinfo_T *fi = (forinfo_T *)fi_void; int result; int flag = ASSIGN_FOR_LOOP | (in_vim9script() !? (ASSIGN_FINAL | ASSIGN_DECL | ASSIGN_NO_MEMBER_TYPE) : 0); listitem_T*item; --- 1777,1786 forinfo_T *fi = (forinfo_T *)fi_void; int result; int flag = ASSIGN_FOR_LOOP | (in_vim9script() !? (ASSIGN_FINAL !// first round: error if variable exists !| (fi->fi_bi == 0 ? 0 : ASSIGN_DECL) !| ASSIGN_NO_MEMBER_TYPE) : 0); listitem_T*item; *** *** 1807,1812 --- 1810,1816 tv.v_lock = VAR_FIXED; tv.vval.v_string = vim_strnsave(fi->fi_string + fi->fi_byte_idx, len); fi->fi_byte_idx += len; + ++fi->fi_bi; result = ex_let_vars(arg, , TRUE, fi->fi_semicolon, fi->fi_varcount, flag, NULL) == OK; vim_free(tv.vval.v_string); *** *** 1819,1824 --- 1823,1829 else { fi->fi_lw.lw_item = item->li_next; + ++fi->fi_bi; result = (ex_let_vars(arg, >li_tv, TRUE, fi->fi_semicolon, fi->fi_varcount, flag, NULL) == OK); } *** ../vim-8.2.3112/src/testdir/test_vim9_script.vim2021-07-05 21:41:44.782616398 +0200 --- src/testdir/test_vim9_script.vim2021-07-05 22:21:32.917862622 +0200 *** *** 2533,2544 enddef def Test_for_loop_fails() ! CheckDefFailure(['for '], 'E1097:') ! CheckDefFailure(['for x'], 'E1097:') ! CheckDefFailure(['for x in'], 'E1097:') ! CheckDefFailure(['for # in range(5)'], 'E690:') ! CheckDefFailure(['for i In range(5)'], 'E690:') ! CheckDefFailure(['var x = 5', 'for x in range(5)'], 'E1017:') CheckScriptFailure(['def Func(arg: any)', 'for arg in range(5)', 'enddef', 'defcompile'], 'E1006:') delfunc! g:Func CheckDefFailure(['for i in xxx'], 'E1001:') --- 2533,2544 enddef def Test_for_loop_fails() ! CheckDefAndScriptFailure2(['for '], 'E1097:', 'E690:') ! CheckDefAndScriptFailure2(['for x'], 'E1097:', 'E690:') ! CheckDefAndScriptFailure2(['for x in'], 'E1097:', 'E15:') ! CheckDefAndScriptFailure(['for # in range(5)'], 'E690:') ! CheckDefAndScriptFailure(['for i In range(5)'], 'E690:') ! CheckDefAndScriptFailure2(['var x = 5', 'for x in range(5)', 'endfor'], 'E1017:', 'E1041:') CheckScriptFailure(['def Func(arg: any)', 'for arg in range(5)', 'enddef', 'defcompile'], 'E1006:') delfunc! g:Func CheckDefFailure(['for i in xxx'], 'E1001:') *** ../vim-8.2.3112/src/version.c 2021-07-05 22:02:53.772180695 +0200 --- src/version.c 2021-07-05 22:09:05.215473016 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3113, /**/ -- >From "know your smileys": <>:-) Bishop /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202107052023.165KNgEd2897363%40masaka.moolenaar.net.
Patch 8.2.3112
Patch 8.2.3112 (after 8.2.3090) Problem:With concealing enabled and indirectly closing a fold the cursor may be somewhere in a folded line when it is not on the first line of the fold. Solution: Check if he cursor is somewhere in the folded text. Files: src/drawscreen.c *** ../vim-8.2.3111/src/drawscreen.c2021-07-03 22:14:57.886777493 +0200 --- src/drawscreen.c2021-07-05 21:59:02.712621416 +0200 *** *** 1382,1388 # ifdef FEAT_CONCEAL // When the line was not folded w_wrow may have been set, recompute it. ! if (wp == curwin && lnum == wp->w_cursor.lnum && conceal_cursor_line(wp)) curs_columns(TRUE); # endif } --- 1382,1391 # ifdef FEAT_CONCEAL // When the line was not folded w_wrow may have been set, recompute it. ! if (wp == curwin ! && wp->w_cursor.lnum >= lnum ! && wp->w_cursor.lnum <= lnume ! && conceal_cursor_line(wp)) curs_columns(TRUE); # endif } *** ../vim-8.2.3111/src/version.c 2021-07-05 21:41:44.782616398 +0200 --- src/version.c 2021-07-05 22:02:12.452259468 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3112, /**/ -- >From "know your smileys": %-)After staring at screen for 15 hours /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202107052003.165K3ZXT2893175%40masaka.moolenaar.net.
Patch 8.2.3111
Patch 8.2.3111 Problem:Vim9: confusing error with extra whitespace before colon. Solution: Check for colon after white space. (closes #8513) Files: src/eval.c, src/vim9compile.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.3110/src/eval.c 2021-06-27 22:03:28.637707737 +0200 --- src/eval.c 2021-07-05 21:35:14.639368162 +0200 *** *** 1660,1665 --- 1660,1666 evalarg_T *evalarg) { forinfo_T *fi; + char_u*var_list_end; char_u*expr; typval_T tv; list_T*l; *** *** 1671,1685 if (fi == NULL) return NULL; ! expr = skip_var_list(arg, TRUE, >fi_varcount, >fi_semicolon, FALSE); ! if (expr == NULL) return fi; ! expr = skipwhite_and_linebreak(expr, evalarg); if (expr[0] != 'i' || expr[1] != 'n' || !(expr[2] == NUL || VIM_ISWHITE(expr[2]))) { ! emsg(_(e_missing_in)); return fi; } --- 1672,1690 if (fi == NULL) return NULL; ! var_list_end = skip_var_list(arg, TRUE, >fi_varcount, !>fi_semicolon, FALSE); ! if (var_list_end == NULL) return fi; ! expr = skipwhite_and_linebreak(var_list_end, evalarg); if (expr[0] != 'i' || expr[1] != 'n' || !(expr[2] == NUL || VIM_ISWHITE(expr[2]))) { ! if (in_vim9script() && *expr == ':' && expr != var_list_end) ! semsg(_(e_no_white_space_allowed_before_colon_str), expr); ! else ! emsg(_(e_missing_in)); return fi; } *** ../vim-8.2.3110/src/vim9compile.c 2021-07-04 22:48:08.261371720 +0200 --- src/vim9compile.c 2021-07-05 21:39:09.858919317 +0200 *** *** 7775,7781 return NULL; if (STRNCMP(p, "in", 2) != 0 || !IS_WHITE_OR_NUL(p[2])) { ! emsg(_(e_missing_in)); return NULL; } wp = p + 2; --- 7775,7784 return NULL; if (STRNCMP(p, "in", 2) != 0 || !IS_WHITE_OR_NUL(p[2])) { ! if (*p == ':' && wp != p) ! semsg(_(e_no_white_space_allowed_before_colon_str), p); ! else ! emsg(_(e_missing_in)); return NULL; } wp = p + 2; *** ../vim-8.2.3110/src/testdir/test_vim9_script.vim2021-07-04 14:47:27.455118487 +0200 --- src/testdir/test_vim9_script.vim2021-07-05 21:37:34.855104149 +0200 *** *** 2566,2571 --- 2566,2578 endfor END CheckDefAndScriptFailure(lines, 'E1012: Type mismatch; expected number but got string', 1) + + lines =<< trim END + for n : number in [1, 2] + echo n + endfor + END + CheckDefAndScriptFailure(lines, 'E1059:', 1) enddef def Test_for_loop_script_var() *** ../vim-8.2.3110/src/version.c 2021-07-05 20:14:54.400221570 +0200 --- src/version.c 2021-07-05 21:34:26.935457918 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3111, /**/ -- >From "know your smileys": 8-O"Omigod!!" (done "rm -rf *" ?) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202107051942.165JgHOR2887959%40masaka.moolenaar.net.
Re: Patch 8.2.3109
* Bram Moolenaar [2021-07-05 17:50 +0200]: > > Patch 8.2.3109 > Problem:Check for $DISPLAY never fails. > Solution: Use eval(). > Files: src/testdir/check.vim Now it builds fine! Many thanks Elimar -- 355/113: Not the famous irrational number pi, but an incredible simulation! -unknown -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210705181937.a5oyq6j4a54zj4nj%40toy.home.lxtec.de.
Patch 8.2.3110
Patch 8.2.3110 Problem:A pattern that matches the cursor position is bit complicated. Solution: Use a dot to indicate the cursor line and column. (Christian Brabandt, closes #8497, closes #8179) Files: runtime/doc/pattern.txt, src/errors.h, src/regexp_bt.c, src/regexp_nfa.c, src/testdir/test_regexp_latin.vim *** ../vim-8.2.3109/runtime/doc/pattern.txt 2021-01-31 17:02:06.258490157 +0100 --- runtime/doc/pattern.txt 2021-07-05 20:07:47.985037677 +0200 *** *** 229,235 *last-pattern* The last used pattern and offset are remembered. They can be used to repeat the search, possibly in another direction or with another count. Note that ! two patterns are remembered: One for 'normal' search commands and one for the substitute command ":s". Each time an empty pattern is given, the previously used pattern is used. However, if there is no previous search command, a previous substitute pattern is used, if possible. --- 230,236 *last-pattern* The last used pattern and offset are remembered. They can be used to repeat the search, possibly in another direction or with another count. Note that ! two patterns are remembered: One for "normal" search commands and one for the substitute command ":s". Each time an empty pattern is given, the previously used pattern is used. However, if there is no previous search command, a previous substitute pattern is used, if possible. *** *** 928,940 \%23l Matches in a specific line. \%<23lMatches above a specific line (lower line number). \%>23lMatches below a specific line (higher line number). These three can be used to match specific lines in a buffer. The "23" can be any line number. The first line is 1. WARNING: When inserting or deleting lines Vim does not automatically update the matches. This means Syntax highlighting quickly becomes ! wrong. Example, to highlight the line where the cursor currently is: > ! :exe '/\%' . line(".") . 'l.*' < When 'hlsearch' is set and you move the cursor around and make changes this will clearly show when the match is updated or not. --- 929,948 \%23l Matches in a specific line. \%<23lMatches above a specific line (lower line number). \%>23lMatches below a specific line (higher line number). + \%.lMatches at the cursor line. + \%<.l Matches above the cursor line. + \%>.l Matches below the cursor line. These three can be used to match specific lines in a buffer. The "23" can be any line number. The first line is 1. WARNING: When inserting or deleting lines Vim does not automatically update the matches. This means Syntax highlighting quickly becomes ! wrong. Also when refering to the cursor position (".") and ! the cursor moves the display isn't updated for this change. An update ! is done when using the |CTRL-L| command (the whole screen is updated). Example, to highlight the line where the cursor currently is: > ! :exe '/\%' . line(".") . 'l' ! < Alternatively use: > ! /\%.l < When 'hlsearch' is set and you move the cursor around and make changes this will clearly show when the match is updated or not. *** *** 942,956 \%23c Matches in a specific column. \%<23cMatches before a specific column. \%>23cMatches after a specific column. These three can be used to match specific columns in a buffer or string. The "23" can be any column number. The first column is 1. Actually, the column is the byte number (thus it's not exactly right for multibyte characters). WARNING: When inserting or deleting text Vim does not automatically update the matches. This means Syntax highlighting quickly becomes ! wrong. Example, to highlight the column where the cursor currently is: > :exe '/\%' . col(".") . 'c' < When 'hlsearch' is set and you move the cursor around and make changes this will clearly show when the match is updated or not. Example for matching a single byte in column 44: > --- 950,972 \%23c Matches in a specific column. \%<23cMatches before a specific column. \%>23cMatches after a specific column. + \%.cMatches at the cursor column. + \%<.c Matches before the cursor column. + \%>.c Matches after the cursor column. These three can be used to match specific columns in a buffer or string. The "23" can be any column number. The first column is 1. Actually, the column is the byte number (thus it's not exactly right for multibyte characters). WARNING: When inserting or deleting
Re: Patch 8.2.3108
Christian wrote: > On Mo, 05 Jul 2021, Elimar Riesebieter wrote: > > > Hi Bram, > > > > * Bram Moolenaar [2021-07-05 14:10 +0200]: > > > > > > > > Patch 8.2.3108 > > > Problem:Test for remote_foreground() fails. (Elimar Riesebieter) > > > Solution: Check that $DISPLAY is set. (Christian Brabandt) > > > Files: src/testdir/check.vim, src/testdir/test_clientserver.vim, > > > src/testdir/test_vim9_builtin.vim > > > > > > > your patch differs from Christian's version. Compiling 8.2.3108 gives > > me: > > Yes, I also wondered about some of the changes. The problem is, when > using empty and quoting the argument, the result cannot be true anymore > > So I think it needs this change: > > diff --git a/src/testdir/check.vim b/src/testdir/check.vim > index 504a1928e..b2f457074 100644 > --- a/src/testdir/check.vim > +++ b/src/testdir/check.vim > @@ -139,7 +139,7 @@ endfunc > " Command to Check for an environment variable > command -nargs=1 CheckEnv call CheckEnv() > func CheckEnv(name) > - if empty('$' .. a:name) > + if empty($ .. a:name) > throw 'Skipped: Environment variable ' .. a:name .. ' is not set' >endif > endfunc > > or change the test to use exists() Sorry, I tried to combine it with an existing test for $DISPLAY. That one used empty(), because it's possible that the environment variable exists but is empty. However, the way I wrote it, it checks if the string '$DISPLAY' is empty. It needs using eval(). -- >From "know your smileys": (X0||) Double hamburger with lettuce and tomato /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202107051550.165FoYZY2831597%40masaka.moolenaar.net.
Patch 8.2.3109
Patch 8.2.3109 Problem:Check for $DISPLAY never fails. Solution: Use eval(). Files: src/testdir/check.vim *** ../vim-8.2.3108/src/testdir/check.vim 2021-07-05 14:10:00.431729296 +0200 --- src/testdir/check.vim 2021-07-05 17:47:04.986038313 +0200 *** *** 139,145 " Command to Check for an environment variable command -nargs=1 CheckEnv call CheckEnv() func CheckEnv(name) ! if empty('$' .. a:name) throw 'Skipped: Environment variable ' .. a:name .. ' is not set' endif endfunc --- 139,145 " Command to Check for an environment variable command -nargs=1 CheckEnv call CheckEnv() func CheckEnv(name) ! if empty(eval('$' .. a:name)) throw 'Skipped: Environment variable ' .. a:name .. ' is not set' endif endfunc *** ../vim-8.2.3108/src/version.c 2021-07-05 14:10:00.431729296 +0200 --- src/version.c 2021-07-05 17:48:44.085929640 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3109, /**/ -- >From "know your smileys": :-XMy lips are sealed /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202107051550.165FoYXs2831603%40masaka.moolenaar.net.
Re: Patch 8.2.3108
On Mo, 05 Jul 2021, Elimar Riesebieter wrote: > * Christian Brabandt [2021-07-05 16:32 +0200]: > > > > > On Mo, 05 Jul 2021, Elimar Riesebieter wrote: > > > > > Hi Bram, > > > > > > * Bram Moolenaar [2021-07-05 14:10 +0200]: > > > > > > > > > > > Patch 8.2.3108 > > > > Problem:Test for remote_foreground() fails. (Elimar Riesebieter) > > > > Solution: Check that $DISPLAY is set. (Christian Brabandt) > > > > Files: src/testdir/check.vim, src/testdir/test_clientserver.vim, > > > > src/testdir/test_vim9_builtin.vim > > > > > > > > > > your patch differs from Christian's version. Compiling 8.2.3108 gives > > > me: > > > > Yes, I also wondered about some of the changes. The problem is, when > > using empty and quoting the argument, the result cannot be true anymore > > > > So I think it needs this change: > > > > diff --git a/src/testdir/check.vim b/src/testdir/check.vim > > index 504a1928e..b2f457074 100644 > > --- a/src/testdir/check.vim > > +++ b/src/testdir/check.vim > > @@ -139,7 +139,7 @@ endfunc > > " Command to Check for an environment variable > > command -nargs=1 CheckEnv call CheckEnv() > > func CheckEnv(name) > > - if empty('$' .. a:name) > > + if empty($ .. a:name) > > throw 'Skipped: Environment variable ' .. a:name .. ' is not set' > >endif > > endfunc > > This Patch fails with: > > Failures: > From test_clientserver.vim: > Found errors in Test_client_server(): > Run 1: > Caught exception in Test_client_server(): Vim(if):E116: Invalid > arguments for function empty($ .. a:name) @ command line..script > /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[473]..function > RunTheTest[44]..Test_client_server[5]..Check_X11_Connection[2]..CheckEnv, > line 1 > Run 2: > Caught exception in Test_client_server(): Vim(if):E116: Invalid > arguments for function empty($ .. a:name) @ command line..script > /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[507]..function > RunTheTest[44]..Test_client_server[5]..Check_X11_Connection[2]..CheckEnv, > line 1 > Run 3: > Caught exception in Test_client_server(): Vim(if):E116: Invalid > arguments for function empty($ .. a:name) @ command line..script > /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[507]..function > RunTheTest[44]..Test_client_server[5]..Check_X11_Connection[2]..CheckEnv, > line 1 > Flaky test failed too often, giving up > From test_vim9_builtin.vim: > Found errors in Test_remote_foreground(): > Caught exception in Test_remote_foreground(): Vim(if):E116: Invalid > arguments for function empty($ .. a:name) @ command line..script > /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[473]..function > RunTheTest[44]..Test_remote_foreground[4]..CheckEnv, line 1 Hm, can you test and change this: , | if empty('$' .. a:name) ` to that: , | if !exists('$' .. a:name) ` Best, Christian -- Gott will, daß der Mensch seinen Spaß hat. -- Theresia von Avila -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210705153743.GE283422%40256bit.org.
Re: Patch 8.2.3108
* Christian Brabandt [2021-07-05 16:32 +0200]: > > On Mo, 05 Jul 2021, Elimar Riesebieter wrote: > > > Hi Bram, > > > > * Bram Moolenaar [2021-07-05 14:10 +0200]: > > > > > > > > Patch 8.2.3108 > > > Problem:Test for remote_foreground() fails. (Elimar Riesebieter) > > > Solution: Check that $DISPLAY is set. (Christian Brabandt) > > > Files: src/testdir/check.vim, src/testdir/test_clientserver.vim, > > > src/testdir/test_vim9_builtin.vim > > > > > > > your patch differs from Christian's version. Compiling 8.2.3108 gives > > me: > > Yes, I also wondered about some of the changes. The problem is, when > using empty and quoting the argument, the result cannot be true anymore > > So I think it needs this change: > > diff --git a/src/testdir/check.vim b/src/testdir/check.vim > index 504a1928e..b2f457074 100644 > --- a/src/testdir/check.vim > +++ b/src/testdir/check.vim > @@ -139,7 +139,7 @@ endfunc > " Command to Check for an environment variable > command -nargs=1 CheckEnv call CheckEnv() > func CheckEnv(name) > - if empty('$' .. a:name) > + if empty($ .. a:name) > throw 'Skipped: Environment variable ' .. a:name .. ' is not set' >endif > endfunc This Patch fails with: Failures: From test_clientserver.vim: Found errors in Test_client_server(): Run 1: Caught exception in Test_client_server(): Vim(if):E116: Invalid arguments for function empty($ .. a:name) @ command line..script /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[473]..function RunTheTest[44]..Test_client_server[5]..Check_X11_Connection[2]..CheckEnv, line 1 Run 2: Caught exception in Test_client_server(): Vim(if):E116: Invalid arguments for function empty($ .. a:name) @ command line..script /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[507]..function RunTheTest[44]..Test_client_server[5]..Check_X11_Connection[2]..CheckEnv, line 1 Run 3: Caught exception in Test_client_server(): Vim(if):E116: Invalid arguments for function empty($ .. a:name) @ command line..script /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[507]..function RunTheTest[44]..Test_client_server[5]..Check_X11_Connection[2]..CheckEnv, line 1 Flaky test failed too often, giving up From test_vim9_builtin.vim: Found errors in Test_remote_foreground(): Caught exception in Test_remote_foreground(): Vim(if):E116: Invalid arguments for function empty($ .. a:name) @ command line..script /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[473]..function RunTheTest[44]..Test_remote_foreground[4]..CheckEnv, line 1 Elimar -- >what IMHO then? IMHO - Inhalation of a Multi-leafed Herbal Opiate ;) --posting from alex in debian-user-- -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210705152843.tkr72jtrhlaqtfgw%40toy.home.lxtec.de.
Re: Patch 8.2.3108
On Mo, 05 Jul 2021, Elimar Riesebieter wrote: > Hi Bram, > > * Bram Moolenaar [2021-07-05 14:10 +0200]: > > > > > Patch 8.2.3108 > > Problem:Test for remote_foreground() fails. (Elimar Riesebieter) > > Solution: Check that $DISPLAY is set. (Christian Brabandt) > > Files: src/testdir/check.vim, src/testdir/test_clientserver.vim, > > src/testdir/test_vim9_builtin.vim > > > > your patch differs from Christian's version. Compiling 8.2.3108 gives > me: Yes, I also wondered about some of the changes. The problem is, when using empty and quoting the argument, the result cannot be true anymore So I think it needs this change: diff --git a/src/testdir/check.vim b/src/testdir/check.vim index 504a1928e..b2f457074 100644 --- a/src/testdir/check.vim +++ b/src/testdir/check.vim @@ -139,7 +139,7 @@ endfunc " Command to Check for an environment variable command -nargs=1 CheckEnv call CheckEnv() func CheckEnv(name) - if empty('$' .. a:name) + if empty($ .. a:name) throw 'Skipped: Environment variable ' .. a:name .. ' is not set' endif endfunc or change the test to use exists() Best, Christian -- Kunst ist kein Abbild der realen Welt. Eine ist, bei Gott, mehr als genug. -- Virginia Woolf -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210705143217.GD283422%40256bit.org.
Re: Patch 8.2.3108
Hi Bram, * Bram Moolenaar [2021-07-05 14:10 +0200]: > > Patch 8.2.3108 > Problem:Test for remote_foreground() fails. (Elimar Riesebieter) > Solution: Check that $DISPLAY is set. (Christian Brabandt) > Files: src/testdir/check.vim, src/testdir/test_clientserver.vim, > src/testdir/test_vim9_builtin.vim > your patch differs from Christian's version. Compiling 8.2.3108 gives me: Failures: From test_vim9_builtin.vim: Found errors in Test_remote_foreground(): command line..script /source/vim/vim-8.2.3108/src/vim-gtk3/testdir/runtest.vim[473]..function RunTheTest[44]..Test_remote_foreground line 7: Expected 'E241:' but got 'E240:No connection to the X server': remote_foreground("NonExistingServer") Elimar -- 355/113: Not the famous irrational number pi, but an incredible simulation! -unknown -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210705141238.iefmxgychgkgm2vh%40toy.home.lxtec.de.
Patch 8.2.3108
Patch 8.2.3108 Problem:Test for remote_foreground() fails. (Elimar Riesebieter) Solution: Check that $DISPLAY is set. (Christian Brabandt) Files: src/testdir/check.vim, src/testdir/test_clientserver.vim, src/testdir/test_vim9_builtin.vim *** ../vim-8.2.3107/src/testdir/check.vim 2021-07-03 21:37:56.330492487 +0200 --- src/testdir/check.vim 2021-07-05 14:06:24.212151205 +0200 *** *** 136,141 --- 136,149 endif endfunc + " Command to Check for an environment variable + command -nargs=1 CheckEnv call CheckEnv() + func CheckEnv(name) + if empty('$' .. a:name) + throw 'Skipped: Environment variable ' .. a:name .. ' is not set' + endif + endfunc + " Command to check that we are using the GUI command CheckGui call CheckGui() func CheckGui() *** ../vim-8.2.3107/src/testdir/test_clientserver.vim 2021-03-20 22:16:52.961362692 +0100 --- src/testdir/test_clientserver.vim 2021-07-05 14:05:16.756284309 +0200 *** *** 13,21 func Check_X11_Connection() if has('x11') ! if empty($DISPLAY) ! throw 'Skipped: $DISPLAY is not set' ! endif try call remote_send('xxx', '') catch --- 13,19 func Check_X11_Connection() if has('x11') ! CheckEnv DISPLAY try call remote_send('xxx', '') catch *** ../vim-8.2.3107/src/testdir/test_vim9_builtin.vim 2021-07-03 19:27:32.690065101 +0200 --- src/testdir/test_vim9_builtin.vim 2021-07-05 14:09:02.347842015 +0200 *** *** 1415,1420 --- 1415,1422 CheckFeature clientserver # remote_foreground() doesn't fail on MS-Windows CheckNotMSWindows + CheckEnv DISPLAY + CheckDefFailure(['remote_foreground(10)'], 'E1013: Argument 1: type mismatch, expected string but got number') assert_fails('remote_foreground("NonExistingServer")', 'E241:') enddef *** ../vim-8.2.3107/src/version.c 2021-07-04 23:29:26.821602887 +0200 --- src/version.c 2021-07-05 14:07:54.987973231 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3108, /**/ -- >From "know your smileys": =):-) Uncle Sam /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202107051210.165CAS2O2785461%40masaka.moolenaar.net.
Re: Test failure building 8.2.3104
* Christian Brabandt [2021-07-05 09:43 +0200]: > > On So, 04 Jul 2021, Bram Moolenaar wrote: > > > > > Elimar Riesebieter wrote: > > > > > Environment: > > > amd64 > > > tmux > > > clang-12 > > > > > > Failures: > > > From test_vim9_builtin.vim: > > > Found errors in Test_remote_foreground(): > > > command line..script > > > /source/vim/vim-8.2.3104/src/vim-gtk3/testdir/runtest.vim[473]..function > > > RunTheTest[44]..Test_remote_foreground line 5: Expected 'E241:' but got > > > 'E240: No connection to the X server': > > > remote_foreground("NonExistingServer") > > > > I can't think of a recent change that could have caused this. > > Perhaps it's a flaky test failure? > > I suppose we need to have this change: > > diff --git a/src/testdir/check.vim b/src/testdir/check.vim > index d6bfe004a..97ab6e5cf 100644 > --- a/src/testdir/check.vim > +++ b/src/testdir/check.vim > @@ -209,6 +209,14 @@ func CheckNotAsan() >endif > endfunc > > +" Command to Check for environment variable > +command -nargs=1 CheckEnv call CheckEnv() > +func CheckEnv(name) > + if !exists('$' .. a:name) > +throw 'Skipped: Environment variable ' .. a:name .. ' does not exists' > + endif > +endfunc > + > " Command to check for satisfying any of the conditions. > " e.g. CheckAnyOf Feature:bsd Feature:sun Linux > command -nargs=+ CheckAnyOf call CheckAnyOf() > diff --git a/src/testdir/test_vim9_builtin.vim > b/src/testdir/test_vim9_builtin.vim > index 38bd8271c..3a952ee79 100644 > --- a/src/testdir/test_vim9_builtin.vim > +++ b/src/testdir/test_vim9_builtin.vim > @@ -1416,6 +1416,7 @@ def Test_remote_foreground() ># remote_foreground() doesn't fail on MS-Windows >CheckNotMSWindows >CheckDefFailure(['remote_foreground(10)'], 'E1013: Argument 1: type > mismatch, expected string but got number') > + CheckEnv DISPLAY >assert_fails('remote_foreground("NonExistingServer")', 'E241:') > enddef This patch fixes the issue for me! Thanks Elimar -- Do you smell something burning or is it me? -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210705093033.rrohw3imryatftvg%40toy.home.lxtec.de.
Re: Test failure building 8.2.3104
On So, 04 Jul 2021, Bram Moolenaar wrote: > > Elimar Riesebieter wrote: > > > Environment: > > amd64 > > tmux > > clang-12 > > > > Failures: > > From test_vim9_builtin.vim: > > Found errors in Test_remote_foreground(): > > command line..script > > /source/vim/vim-8.2.3104/src/vim-gtk3/testdir/runtest.vim[473]..function > > RunTheTest[44]..Test_remote_foreground line 5: Expected 'E241:' but got > > 'E240: No connection to the X server': > > remote_foreground("NonExistingServer") > > I can't think of a recent change that could have caused this. > Perhaps it's a flaky test failure? I suppose we need to have this change: diff --git a/src/testdir/check.vim b/src/testdir/check.vim index d6bfe004a..97ab6e5cf 100644 --- a/src/testdir/check.vim +++ b/src/testdir/check.vim @@ -209,6 +209,14 @@ func CheckNotAsan() endif endfunc +" Command to Check for environment variable +command -nargs=1 CheckEnv call CheckEnv() +func CheckEnv(name) + if !exists('$' .. a:name) +throw 'Skipped: Environment variable ' .. a:name .. ' does not exists' + endif +endfunc + " Command to check for satisfying any of the conditions. " e.g. CheckAnyOf Feature:bsd Feature:sun Linux command -nargs=+ CheckAnyOf call CheckAnyOf() diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index 38bd8271c..3a952ee79 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -1416,6 +1416,7 @@ def Test_remote_foreground() # remote_foreground() doesn't fail on MS-Windows CheckNotMSWindows CheckDefFailure(['remote_foreground(10)'], 'E1013: Argument 1: type mismatch, expected string but got number') + CheckEnv DISPLAY assert_fails('remote_foreground("NonExistingServer")', 'E241:') enddef Best, Christian -- Elektrizität ist: Morgens mit Spannung aufstehen, mit Widerstand zur Schule gehen, in allen Stunden gegen den Strom fließen, geladen nach Hause kommen und dann noch vom Vater eine gewischt kriegen! -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210705074307.GB283422%40256bit.org.