]> granicus.if.org Git - vim/commitdiff
patch 9.0.0149: test for fuzzy completion fails sometimes v9.0.0149
authorBram Moolenaar <Bram@vim.org>
Sat, 6 Aug 2022 09:28:19 +0000 (10:28 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 6 Aug 2022 09:28:19 +0000 (10:28 +0100)
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)

src/testdir/test_cmdline.vim
src/version.c

index cd9aa277107366658bdac554e862f771638b651a..912f3a5d11c0477ad3a625126f3f2ed05c06e212 100644 (file)
@@ -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
index e32b8095d7013701483011c9a7cce73264ac6e32..acecc11727f84864a167fb31f8a9ce3f0347c506 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    149,
 /**/
     148,
 /**/