diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-12 06:39:17 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-07-12 06:49:38 +0800 |
commit | 091a130804282c9d40e639d68659d2ea2941259d (patch) | |
tree | fd79de60c9de836fb32836dae929a238205fe4e9 /test | |
parent | 50feb85b0c1e29583c6f6f928512e7b853a3ebf6 (diff) | |
download | rneovim-091a130804282c9d40e639d68659d2ea2941259d.tar.gz rneovim-091a130804282c9d40e639d68659d2ea2941259d.tar.bz2 rneovim-091a130804282c9d40e639d68659d2ea2941259d.zip |
vim-patch:9.1.0566: Stop dir in findfile() doesn't work properly w/o trailing slash
Problem: Stop directory in findfile() doesn't work properly without a
trailing slash.
Solution: Always use fnamencmp(), not fnamecmp().
related: vim/vim#15200
related: vim/vim#15202
https://github.com/vim/vim/commit/e6ab23bd4a41840860ae2904956c4d255a9dd528
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_findfile.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/old/testdir/test_findfile.vim b/test/old/testdir/test_findfile.vim index 622a428bf8..0c663f0923 100644 --- a/test/old/testdir/test_findfile.vim +++ b/test/old/testdir/test_findfile.vim @@ -101,11 +101,18 @@ func Test_findfile() let l = findfile('bar', ';' . save_dir . '/Xfinddir1/Xdir2/', -1) call assert_equal(1, len(l)) call assert_match('.*/Xfinddir1/Xdir2/Xdir3/bar', l[0]) + let l = findfile('bar', ';' . save_dir . '/Xfinddir1/Xdir2', -1) + call assert_equal(1, len(l)) + call assert_match('.*/Xfinddir1/Xdir2/Xdir3/bar', l[0]) let l = findfile('bar', ';' . save_dir . '/Xfinddir1/', -1) call assert_equal(2, len(l)) call assert_match('.*/Xfinddir1/Xdir2/Xdir3/bar', l[0]) call assert_match('.*/Xfinddir1/bar', l[1]) + let l = findfile('bar', ';' . save_dir . '/Xfinddir1', -1) + call assert_equal(2, len(l)) + call assert_match('.*/Xfinddir1/Xdir2/Xdir3/bar', l[0]) + call assert_match('.*/Xfinddir1/bar', l[1]) " Test combined downwards and upwards search from Xdir2/. cd ../.. |