diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-06 10:28:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-06 10:28:19 +0100 |
commit | 5ac4b1a24e3ba52698a0d24b22cdd2e1c7895417 (patch) | |
tree | 0146ab05274222cd5a004dac0b2bdfa74ff852e9 /src/testdir/test_cmdline.vim | |
parent | 3ec3b8e92da8299bcbfd851fa76fccf5403e4097 (diff) |
patch 9.0.0149: test for fuzzy completion fails sometimesv9.0.0149
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 #10854)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r-- | src/testdir/test_cmdline.vim | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index cd9aa27710..912f3a5d11 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -2423,17 +2423,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 |