mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2030: some tests fail on Mac
Problem: Some tests fail on Mac. Solution: Avoid Mac test failures. Add additional test for wildmenu. (Yegappan Lakshmanan, closes #7341)
This commit is contained in:
@@ -136,6 +136,13 @@ else
|
|||||||
let s:t_normal = &t_me
|
let s:t_normal = &t_me
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if has('mac')
|
||||||
|
" In MacOS, when starting a shell in a terminal, a bash deprecation warning
|
||||||
|
" message is displayed. This breaks the terminal test. Disable the warning
|
||||||
|
" message.
|
||||||
|
let $BASH_SILENCE_DEPRECATION_WARNING = 1
|
||||||
|
endif
|
||||||
|
|
||||||
" Prepare for calling test_garbagecollect_now().
|
" Prepare for calling test_garbagecollect_now().
|
||||||
let v:testing = 1
|
let v:testing = 1
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ func Test_complete_wildmenu()
|
|||||||
call delete('Xdir1', 'd')
|
call delete('Xdir1', 'd')
|
||||||
set nowildmenu
|
set nowildmenu
|
||||||
endfunc
|
endfunc
|
||||||
f
|
|
||||||
func Test_wildmenu_screendump()
|
func Test_wildmenu_screendump()
|
||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
@@ -112,7 +112,6 @@ func Test_wildmenu_screendump()
|
|||||||
call delete('XTest_wildmenu')
|
call delete('XTest_wildmenu')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
func Test_map_completion()
|
func Test_map_completion()
|
||||||
CheckFeature cmdline_compl
|
CheckFeature cmdline_compl
|
||||||
call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt')
|
call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
@@ -1631,4 +1630,34 @@ func Test_read_shellcmd()
|
|||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Test for going up and down the directory tree using 'wildmenu'
|
||||||
|
func Test_wildmenu_dirstack()
|
||||||
|
CheckUnix
|
||||||
|
%bw!
|
||||||
|
call mkdir('Xdir1/dir2/dir3', 'p')
|
||||||
|
call writefile([], 'Xdir1/file1_1.txt')
|
||||||
|
call writefile([], 'Xdir1/file1_2.txt')
|
||||||
|
call writefile([], 'Xdir1/dir2/file2_1.txt')
|
||||||
|
call writefile([], 'Xdir1/dir2/file2_2.txt')
|
||||||
|
call writefile([], 'Xdir1/dir2/dir3/file3_1.txt')
|
||||||
|
call writefile([], 'Xdir1/dir2/dir3/file3_2.txt')
|
||||||
|
cd Xdir1/dir2/dir3
|
||||||
|
set wildmenu
|
||||||
|
|
||||||
|
call feedkeys(":e \<Tab>\<C-B>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"e file3_1.txt', @:)
|
||||||
|
call feedkeys(":e \<Tab>\<Up>\<C-B>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"e ../dir3/', @:)
|
||||||
|
call feedkeys(":e \<Tab>\<Up>\<Up>\<C-B>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"e ../../dir2/', @:)
|
||||||
|
call feedkeys(":e \<Tab>\<Up>\<Up>\<Down>\<C-B>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"e ../../dir2/dir3/', @:)
|
||||||
|
call feedkeys(":e \<Tab>\<Up>\<Up>\<Down>\<Down>\<C-B>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"e ../../dir2/dir3/file3_1.txt', @:)
|
||||||
|
|
||||||
|
cd -
|
||||||
|
call delete('Xdir1', 'rf')
|
||||||
|
set wildmenu&
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -815,7 +815,13 @@ func Test_shell()
|
|||||||
CheckUnix
|
CheckUnix
|
||||||
let save_shell = &shell
|
let save_shell = &shell
|
||||||
set shell=
|
set shell=
|
||||||
call assert_fails('shell', 'E91:')
|
let caught_e91 = 0
|
||||||
|
try
|
||||||
|
shell
|
||||||
|
catch /E91:/
|
||||||
|
let caught_e91 = 1
|
||||||
|
endtry
|
||||||
|
call assert_equal(1, caught_e91)
|
||||||
let &shell = save_shell
|
let &shell = save_shell
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@@ -605,6 +605,7 @@ func Test_popup_drag_termwin()
|
|||||||
endfor
|
endfor
|
||||||
%foldclose
|
%foldclose
|
||||||
set shell=/bin/sh noruler
|
set shell=/bin/sh noruler
|
||||||
|
unlet $PROMPT_COMMAND
|
||||||
let $PS1 = 'vim> '
|
let $PS1 = 'vim> '
|
||||||
terminal ++rows=4
|
terminal ++rows=4
|
||||||
$wincmd w
|
$wincmd w
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2030,
|
||||||
/**/
|
/**/
|
||||||
2029,
|
2029,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user