diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-18 12:00:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 12:00:40 +0800 |
commit | 0aae7f386042593aecfc8237020899d0e94fe8e4 (patch) | |
tree | e8b6a0e868c51ac7f64bc11fbad97a0dd8ff665e | |
parent | 2082d275fecfb773e4ee6db780e8b22009e64deb (diff) | |
download | rneovim-0aae7f386042593aecfc8237020899d0e94fe8e4.tar.gz rneovim-0aae7f386042593aecfc8237020899d0e94fe8e4.tar.bz2 rneovim-0aae7f386042593aecfc8237020899d0e94fe8e4.zip |
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)
https://github.com/vim/vim/commit/5ac4b1a24e3ba52698a0d24b22cdd2e1c7895417
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index ebcbc8177e..980b8c5b38 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -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 |