diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-12 06:33:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-12 06:33:54 +0800 |
commit | 31d53cbb0fff48488f45ba234b8d595c31507739 (patch) | |
tree | 396fc28709e2f5696d2cea937be24b735b2aab63 /test | |
parent | 45b7a2c50335e1943a36715101e40eda5a1423f3 (diff) | |
download | rneovim-31d53cbb0fff48488f45ba234b8d595c31507739.tar.gz rneovim-31d53cbb0fff48488f45ba234b8d595c31507739.tar.bz2 rneovim-31d53cbb0fff48488f45ba234b8d595c31507739.zip |
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)
https://github.com/vim/vim/commit/4eaef9979fc5032606897963f1af37674ee0d422
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_fnamemodify.vim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/old/testdir/test_fnamemodify.vim b/test/old/testdir/test_fnamemodify.vim index 258a2093bd..2e6c7b8a1e 100644 --- a/test/old/testdir/test_fnamemodify.vim +++ b/test/old/testdir/test_fnamemodify.vim @@ -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', ':~')) |