Patch 8.1.1624
Problem: When testing in the GUI may try to run gvim in a terminal.
Solution: Add the -v argument. (Yee Cheng Chin, closes #4605) Don't skip
tests that work now.
Files: src/testdir/shared.vim, src/testdir/term_util.vim,
src/testdir/test_mapping.vim, src/testdir/test_timers.vim
*** ../vim-8.1.1623/src/testdir/shared.vim 2019-06-23 00:49:50.985715087 +0200
--- src/testdir/shared.vim 2019-07-04 12:29:42.224693150 +0200
***************
*** 284,289 ****
--- 284,296 ----
return cmd
endfunc
+ " Get the command to run Vim, with --clean, and force to run in terminal so it
+ " won't start a new GUI.
+ func GetVimCommandCleanTerm()
+ " Add -v to have gvim run in the terminal (if possible)
+ return GetVimCommandClean() .. ' -v '
+ endfunc
+
" Run Vim, using the "vimcmd" file and "-u NORC".
" "before" is a list of Vim commands to be executed before loading plugins.
" "after" is a list of Vim commands to be executed after loading plugins.
*** ../vim-8.1.1623/src/testdir/term_util.vim 2019-06-23 00:49:50.985715087 +0200
--- src/testdir/term_util.vim 2019-07-04 12:31:54.659243401 +0200
***************
*** 59,68 ****
let cols = get(a:options, 'cols', 75)
let statusoff = get(a:options, 'statusoff', 1)
! let cmd = GetVimCommandClean()
- " Add -v to have gvim run in the terminal (if possible)
- let cmd .= ' -v ' . a:arguments
let buf = term_start(cmd, {
\ 'curwin': 1,
\ 'term_rows': rows,
--- 59,66 ----
let cols = get(a:options, 'cols', 75)
let statusoff = get(a:options, 'statusoff', 1)
! let cmd = GetVimCommandCleanTerm() .. a:arguments
let buf = term_start(cmd, {
\ 'curwin': 1,
\ 'term_rows': rows,
*** ../vim-8.1.1623/src/testdir/test_mapping.vim 2019-07-03 21:40:10.877854768 +0200
--- src/testdir/test_mapping.vim 2019-07-04 12:57:41.019212398 +0200
***************
*** 399,405 ****
endfunc
func Test_error_in_map_expr()
! if !has('terminal') || has('gui_running')
throw 'Skipped: cannot run Vim in a terminal window'
endif
--- 399,405 ----
endfunc
func Test_error_in_map_expr()
! if !has('terminal') || (has('win32') && has('gui_running'))
throw 'Skipped: cannot run Vim in a terminal window'
endif
***************
*** 413,419 ****
[CODE]
call writefile(lines, 'Xtest.vim')
! let buf = term_start(GetVimCommandClean() .. ' -S Xtest.vim', {'term_rows': 8})
let job = term_getjob(buf)
call WaitForAssert({-> assert_notequal('', term_getline(buf, 8))})
--- 413,419 ----
[CODE]
call writefile(lines, 'Xtest.vim')
! let buf = term_start(GetVimCommandCleanTerm() .. ' -S Xtest.vim', {'term_rows': 8})
let job = term_getjob(buf)
call WaitForAssert({-> assert_notequal('', term_getline(buf, 8))})
diff: missing operand after '../vim-8.1.1623/'
diff: Try 'diff --help' for more information.
*** ../vim-8.1.1623/src/testdir/test_timers.vim 2019-07-03 21:40:10.877854768 +0200
--- src/testdir/test_timers.vim 2019-07-04 12:57:54.687120020 +0200
***************
*** 334,340 ****
endfunc
func Test_error_in_timer_callback()
! if !has('terminal') || has('gui_running')
throw 'Skipped: cannot run Vim in a terminal window'
endif
--- 334,340 ----
endfunc
func Test_error_in_timer_callback()
! if !has('terminal') || (has('win32') && has('gui_running'))
throw 'Skipped: cannot run Vim in a terminal window'
endif
***************
*** 348,354 ****
[CODE]
call writefile(lines, 'Xtest.vim')
! let buf = term_start(GetVimCommandClean() .. ' -S Xtest.vim', {'term_rows': 8})
let job = term_getjob(buf)
call WaitForAssert({-> assert_notequal('', term_getline(buf, 8))})
--- 348,354 ----
[CODE]
call writefile(lines, 'Xtest.vim')
! let buf = term_start(GetVimCommandCleanTerm() .. ' -S Xtest.vim', {'term_rows': 8})
let job = term_getjob(buf)
call WaitForAssert({-> assert_notequal('', term_getline(buf, 8))})
*** ../vim-8.1.1623/src/version.c 2019-07-04 11:59:25.420462567 +0200
--- src/version.c 2019-07-04 13:03:06.441027999 +0200
***************
*** 779,780 ****
--- 779,782 ----
{ /* Add new patch number below this line */
+ /**/
+ 1624,
/**/
--
Not too long ago, unzipping in public was illegal...
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///