Merge pull request #29776 from zeertzjq/vim-8.2.1432

vim-patch:partial:8.2.{1432,2571}
This commit is contained in:
zeertzjq 2024-07-18 07:21:09 +08:00 committed by GitHub
commit ca6710c83e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2208,10 +2208,8 @@ func s:test_xgrep(cchar)
endfunc
func Test_grep()
if !has('unix')
" The grepprg may not be set on non-Unix systems
return
endif
CheckUnix
call s:test_xgrep('c')
call s:test_xgrep('l')
@ -3130,7 +3128,7 @@ func Test_vimgrep_existing_swapfile()
call assert_match('.Xapple.swo', swapname(''))
call delete('Xapple')
call delete('Xapple.swp')
call delete('.Xapple.swp')
augroup grep
au! SwapExists
augroup END
@ -5922,6 +5920,16 @@ func Test_qfbuf_update()
call Xqfbuf_update('l')
endfunc
func Test_vimgrep_noswapfile()
set noswapfile
call writefile(['one', 'two', 'three'], 'Xgreppie')
vimgrep two Xgreppie
call assert_equal('two', getline('.'))
call delete('Xgreppie')
set swapfile
endfunc
" Test for the :vimgrep 'f' flag (fuzzy match)
func Xvimgrep_fuzzy_match(cchar)
call s:setup_commands(a:cchar)