vim-patch:8.2.1804: resolve('/') returns an empty string (#13121)

Problem:    resolve('/') returns an empty string.
Solution:   Don't remove single slash. (closes vim/vim#7074)
50c4e9e08f

Cherry-pick the test rename from Test_resolve() to Test_resolve_unix()
from patch 8.1.0894.

N/A patches for version.c:

vim-patch:8.1.0929: no error when requesting ConPTY but it's not available

Problem:    No error when requesting ConPTY but it's not available.
Solution:   Add an error message. (Hirohito Higashi, closes vim/vim#3967)
5acd987258

vim-patch:8.1.1535: popup select test fails on Mac

Problem:    Popup select test fails on Mac.
Solution:   Skip test if clipboard feature not available.
650a63748c

vim-patch:8.1.1536: popup select test still fails on Mac

Problem:    Popup select test still fails on Mac.
Solution:   Set 'clipboard' to "autoselect"
1755ec4278

vim-patch:8.1.1604: popup window scroll test is flaky

Problem:    Popup window scroll test is flaky.
Solution:   Add a delay between scroll events.
13b47c37a6

vim-patch:8.1.1668: popup window test is a bit flaky on some systems

Problem:    Popup window test is a bit flaky on some systems.
Solution:   Clear the command line. (Naruhiko Nishino, closes vim/vim#4656)
8ccabf624e

vim-patch:8.1.1935: test for text property popup window is flaky

Problem:    Test for text property popup window is flaky.
Solution:   Remove the undo message
57441d6fa0

vim-patch:8.1.2347: MacOS: build fails

Problem:    MacOS: build fails.
Solution:   Don't define _XOPEN_SOURCE for Mac.
84f903326d

vim-patch:8.2.0351: terminal in popup test is still a bit flaky

Problem:    Terminal in popup test is still a bit flaky.
Solution:   Clear and redraw before opening the popup.
3e919d2924

vim-patch:8.2.0752: terminal in popup window test is a bit flaky

Problem:    Terminal in popup window test is a bit flaky.
Solution:   Wait for shell job status to be "run".  Mark as flaky test.
e06a28f5e3

vim-patch:8.2.1087: possible memory leak when file expansion fails

Problem:    Possible memory leak when file expansion fails.
Solution:   Clear the grow array when returning FAIL.  Use an error message
            instead of an empty string.
566cc8c72b

vim-patch:8.2.1863: json code not sufficiently tested

Problem:    Json code not sufficiently tested.
Solution:   Add more test cases. (Dominique Pellé, closes vim/vim#7166)
e3c65ce4e5
This commit is contained in:
Jan Edmund Lazo 2020-10-20 09:29:34 -04:00 committed by GitHub
parent 38efa1730f
commit 75996a2cdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -6936,7 +6936,7 @@ static void f_resolve(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
ptrdiff_t len = (ptrdiff_t)strlen(p);
if (len > 0 && after_pathsep(p, p + len)) {
if (len > 1 && after_pathsep(p, p + len)) {
has_trailing_pathsep = true;
p[len - 1] = NUL; // The trailing slash breaks readlink().
}

View File

@ -214,7 +214,7 @@ func Test_strftime()
endif
endfunc
func Test_resolve()
func Test_resolve_unix()
if !has('unix')
return
endif
@ -258,6 +258,8 @@ func Test_resolve()
call assert_equal('Xlink2', resolve('Xlink1'))
call assert_equal('./Xlink2', resolve('./Xlink1'))
call delete('Xlink1')
call assert_equal('/', resolve('/'))
endfunc
func Test_simplify()