mirror of
https://github.com/neovim/neovim.git
synced 2026-07-18 15:11:40 +00:00
vim-patch:8.2.3388: fnamemodify('path/..', ':p') differs from using 'path/../' (#29667)
Problem: fnamemodify('path/..', ':p') differs from using 'path/../'.
Solution: Include the "/.." in the directory name. (closes vim/vim#8808)
4eaef9979f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 31d53cbb0f)
This commit is contained in:
committed by
github-actions[bot]
parent
113e5a91de
commit
7c055bd74b
@@ -12,6 +12,8 @@ func Test_fnamemodify()
|
||||
call assert_equal('r', fnamemodify('.', ':p:h')[-1:])
|
||||
call assert_equal('t', fnamemodify('test.out', ':p')[-1:])
|
||||
call assert_equal($HOME .. "/foo" , fnamemodify('~/foo', ':p'))
|
||||
call assert_equal(fnamemodify('.', ':p:h:h:h') .. '/', fnamemodify($HOME .. '/../', ':p'))
|
||||
call assert_equal(fnamemodify('.', ':p:h:h:h') .. '/', fnamemodify($HOME .. '/..', ':p'))
|
||||
call assert_equal('test.out', fnamemodify('test.out', ':.'))
|
||||
call assert_equal('a', fnamemodify('../testdir/a', ':.'))
|
||||
call assert_equal('~/testdir/test.out', fnamemodify('test.out', ':~'))
|
||||
|
||||
Reference in New Issue
Block a user