aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-08 22:10:43 -0500
committerGitHub <noreply@github.com>2021-02-08 22:10:43 -0500
commit8becdec3919c0925cd274ca8316c9c1c0faad722 (patch)
tree2d1b7c2e30539f6f4a5dfc74d0ecfbaf656e50e4 /src
parent38ea2ce342e0b0c5e1410a5d936b91d19fb9d4bb (diff)
downloadrneovim-8becdec3919c0925cd274ca8316c9c1c0faad722.tar.gz
rneovim-8becdec3919c0925cd274ca8316c9c1c0faad722.tar.bz2
rneovim-8becdec3919c0925cd274ca8316c9c1c0faad722.zip
vim-patch:8.2.2259: Test_Executable() fails when using chroot (#13907)
Problem: Test_Executable() fails when using chroot. Solution: Ignore the difference between "sbin" and "bin". https://github.com/vim/vim/commit/a387083b2f65c2c14b19087c7d7f94ca23de1d48 Cherry-pick Test_Executable() changes from patches v8.1.1921, v8.2.1432 to be in sync with Vim. N/A patches for version.c: vim-patch:8.1.0509: checking cwd not accessible fails for root Problem: Checking cwd not accessible fails for root. (James McCoy) Solution: Skip this part of the test for root. (closes vim/vim#3595) https://github.com/vim/vim/commit/0b38f54730c3f9835ddade01c2263ce0f56c1c0f vim-patch:8.2.2487: terminal shows garbage after double-wide character Problem: Terminal shows garbage after double-wide character with a combining character. (Kyoichiro Yamada) Solution: Libvterm: do not add the width of the combining character to the glyph width. (closes vim/vim#7801) https://github.com/vim/vim/commit/4549dad874244fe933b969e4ac0b41923ee70dc3 vim-patch:8.2.2488: json_encode() gives generic argument error Problem: json_encode() gives generic argument error. Solution: Mention the type that can't be encoded. (issue vim/vim#7802) https://github.com/vim/vim/commit/a853089479b60b829bab1c4a0a737a073415f8a7
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_functions.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 917a5e8eca..f0c1a1c7f9 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -930,10 +930,20 @@ func Test_Executable()
" get "cat" path and remove the leading /
let catcmd = exepath('cat')[1:]
new
+ " check that the relative path works in /
lcd /
call assert_equal(1, executable(catcmd))
- call assert_equal('/' .. catcmd, exepath(catcmd))
+ " let result = catcmd->exepath()
+ let result = exepath(catcmd)
+ " when using chroot looking for sbin/cat can return bin/cat, that is OK
+ if catcmd =~ '\<sbin\>' && result =~ '\<bin\>'
+ call assert_equal('/' .. substitute(catcmd, '\<sbin\>', 'bin', ''), result)
+ else
+ call assert_equal('/' .. catcmd, result)
+ endif
bwipe
+ else
+ throw 'Skipped: does not work on this platform'
endif
endfunc