mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 21:25:04 -07:00
vim-patch:partial:9.0.1570: some tests are slow (#23688)
Problem: Some tests are slow.
Solution: Make a few test cases faster.
bf63011a52
Cherry-pick related test_cmdline.vim changes from patch 9.0.0418.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
d86a737df1
commit
413d57ae71
@ -719,7 +719,7 @@ endfunc
|
|||||||
func Test_shellcmd_completion()
|
func Test_shellcmd_completion()
|
||||||
let save_path = $PATH
|
let save_path = $PATH
|
||||||
|
|
||||||
call mkdir('Xpathdir/Xpathsubdir', 'p')
|
call mkdir('Xpathdir/Xpathsubdir', 'pR')
|
||||||
call writefile([''], 'Xpathdir/Xfile.exe')
|
call writefile([''], 'Xpathdir/Xfile.exe')
|
||||||
call setfperm('Xpathdir/Xfile.exe', 'rwx------')
|
call setfperm('Xpathdir/Xfile.exe', 'rwx------')
|
||||||
|
|
||||||
@ -735,17 +735,15 @@ func Test_shellcmd_completion()
|
|||||||
call insert(expected, 'Xfile.exe')
|
call insert(expected, 'Xfile.exe')
|
||||||
call assert_equal(expected, actual)
|
call assert_equal(expected, actual)
|
||||||
|
|
||||||
call delete('Xpathdir', 'rf')
|
|
||||||
let $PATH = save_path
|
let $PATH = save_path
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_expand_star_star()
|
func Test_expand_star_star()
|
||||||
call mkdir('a/b', 'p')
|
call mkdir('a/b/c', 'pR')
|
||||||
call writefile(['asdfasdf'], 'a/b/fileXname')
|
call writefile(['asdfasdf'], 'a/b/c/fileXname')
|
||||||
call feedkeys(":find **/fileXname\<Tab>\<CR>", 'xt')
|
call feedkeys(":find a/**/fileXname\<Tab>\<CR>", 'xt')
|
||||||
call assert_equal('find a/b/fileXname', @:)
|
call assert_equal('find a/b/c/fileXname', @:)
|
||||||
bwipe!
|
bwipe!
|
||||||
call delete('a', 'rf')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_cmdline_paste()
|
func Test_cmdline_paste()
|
||||||
|
@ -710,19 +710,20 @@ func CheckItems(checks)
|
|||||||
for i in range(0, len(names) - 1)
|
for i in range(0, len(names) - 1)
|
||||||
new
|
new
|
||||||
try
|
try
|
||||||
exe 'edit ' . fnameescape(names[i])
|
exe 'edit ' .. fnameescape(names[i])
|
||||||
catch
|
catch
|
||||||
call assert_report('cannot edit "' . names[i] . '": ' . v:exception)
|
call assert_report('cannot edit "' .. names[i] .. '": ' .. v:exception)
|
||||||
endtry
|
endtry
|
||||||
if &filetype == '' && &readonly
|
if &filetype == '' && &readonly
|
||||||
" File exists but not able to edit it (permission denied)
|
" File exists but not able to edit it (permission denied)
|
||||||
else
|
else
|
||||||
let expected = ft == 'none' ? '' : ft
|
let expected = ft == 'none' ? '' : ft
|
||||||
call assert_equal(expected, &filetype, 'with file name: ' . names[i])
|
call assert_equal(expected, &filetype, 'with file name: ' .. names[i])
|
||||||
endif
|
endif
|
||||||
bwipe!
|
bwipe!
|
||||||
endfor
|
endfor
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
set swapfile&
|
set swapfile&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user