1
0
forked from aniani/vim

patch 8.2.2259: Test_Executable() fails when using chroot

Problem:    Test_Executable() fails when using chroot.
Solution:   Ignore the difference between "sbin" and "bin".
This commit is contained in:
Bram Moolenaar
2021-01-01 14:20:44 +01:00
parent beef4eeda5
commit a387083b2f
2 changed files with 9 additions and 1 deletions

View File

@@ -1288,7 +1288,13 @@ func Test_Executable()
" check that the relative path works in / " check that the relative path works in /
lcd / lcd /
call assert_equal(1, executable(catcmd)) call assert_equal(1, executable(catcmd))
call assert_equal('/' .. catcmd, catcmd->exepath()) let result = catcmd->exepath()
" 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 bwipe
else else
throw 'Skipped: does not work on this platform' throw 'Skipped: does not work on this platform'

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2259,
/**/ /**/
2258, 2258,
/**/ /**/