]> granicus.if.org Git - vim/commitdiff
patch 9.0.0030: matchfuzzy test depends on path of current directory v9.0.0030
authorBram Moolenaar <Bram@vim.org>
Sat, 2 Jul 2022 19:48:01 +0000 (20:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 2 Jul 2022 19:48:01 +0000 (20:48 +0100)
Problem:    Matchfuzzy test depends on path of current directory.
Solution:   Use fnamemodify() to remove the path. (Robin Becker,
            closes #10650)

src/testdir/test_matchfuzzy.vim
src/version.c

index 02a74469e092acbe34fe7006271c1bc9ea51398e..26fe04db8ff1a9b0e08184e10da4a3cb0b7680e7 100644 (file)
@@ -57,7 +57,7 @@ func Test_matchfuzzy()
 
   %bw!
   eval ['somebuf', 'anotherone', 'needle', 'yetanotherone']->map({_, v -> bufadd(v) + bufload(v)})
-  let l = getbufinfo()->map({_, v -> v.name})->matchfuzzy('ndl')
+  let l = getbufinfo()->map({_, v -> fnamemodify(v.name, ':t')})->matchfuzzy('ndl')
   call assert_equal(1, len(l))
   call assert_match('needle', l[0])
 
index 3c6efdf5d2d67ff9752339821c6dab7ff32be42d..cb69e41930441c51d09a55c08df1fedb2dc698d6 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    30,
 /**/
     29,
 /**/