mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.0149: test for fuzzy completion fails sometimes (#21876)
Problem: Test for fuzzy completion fails sometimes.
Solution: Use a more specific file name to minimize the chance of matching a
random directory name. (closes vim/vim#10854)
5ac4b1a24e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
2082d275fe
commit
0aae7f3860
@ -2704,17 +2704,18 @@ endfunc
|
||||
" buffer name fuzzy completion
|
||||
func Test_fuzzy_completion_bufname()
|
||||
set wildoptions&
|
||||
edit SomeFile.txt
|
||||
" Use a long name to reduce the risk of matching a random directory name
|
||||
edit SomeRandomFileWithLetters.txt
|
||||
enew
|
||||
call feedkeys(":b SF\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b SF', @:)
|
||||
call feedkeys(":b S*File.txt\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b SomeFile.txt', @:)
|
||||
call feedkeys(":b SRFWL\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b SRFWL', @:)
|
||||
call feedkeys(":b S*FileWithLetters.txt\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b SomeRandomFileWithLetters.txt', @:)
|
||||
set wildoptions=fuzzy
|
||||
call feedkeys(":b SF\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b SomeFile.txt', @:)
|
||||
call feedkeys(":b S*File.txt\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b S*File.txt', @:)
|
||||
call feedkeys(":b SRFWL\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b SomeRandomFileWithLetters.txt', @:)
|
||||
call feedkeys(":b S*FileWithLetters.txt\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"b S*FileWithLetters.txt', @:)
|
||||
%bw!
|
||||
set wildoptions&
|
||||
endfunc
|
||||
|
Loading…
Reference in New Issue
Block a user