aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-03 06:01:51 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-03 06:21:05 +0800
commit357d63f5d799aa49068ed4fdc941b7a39f775365 (patch)
treeb77391d7a4028cc34c9ffa60c8b7d40189f55a87
parent312f1b65c86c81511ec9f7784bd6b3cff8d52cb8 (diff)
downloadrneovim-357d63f5d799aa49068ed4fdc941b7a39f775365.tar.gz
rneovim-357d63f5d799aa49068ed4fdc941b7a39f775365.tar.bz2
rneovim-357d63f5d799aa49068ed4fdc941b7a39f775365.zip
vim-patch:9.0.0030: matchfuzzy test depends on path of current directory
Problem: Matchfuzzy test depends on path of current directory. Solution: Use fnamemodify() to remove the path. (Robin Becker, closes vim/vim#10650) https://github.com/vim/vim/commit/22e7e867e224596bd758260e4278ce6239c35ba5
-rw-r--r--src/nvim/testdir/test_matchfuzzy.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_matchfuzzy.vim b/src/nvim/testdir/test_matchfuzzy.vim
index 6b4949ad8c..c836bc87aa 100644
--- a/src/nvim/testdir/test_matchfuzzy.vim
+++ b/src/nvim/testdir/test_matchfuzzy.vim
@@ -59,7 +59,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])