0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.0701: system test failing when using X11 forwarding

Problem:    System test failing when using X11 forwarding.
Solution:   Set $XAUTHORITY before changing $HOME. (closes #1812)
            Also use a better check for the exit value.
This commit is contained in:
Bram Moolenaar
2017-07-08 17:03:21 +02:00
parent 0ea5070d79
commit 11e79bb04e
3 changed files with 9 additions and 3 deletions

View File

@@ -8,7 +8,11 @@ endif
" Only when the +eval feature is present.
if 1
" Make sure the .Xauthority file can be found after changing $HOME.
if $XAUTHORITY == ''
let $XAUTHORITY = $HOME . '/.Xauthority'
endif
" Make sure $HOME does not get read or written.
let $HOME = '/does/not/exist'
endif

View File

@@ -49,12 +49,12 @@ endfunction
function! Test_system_exmode()
if has('unix') " echo $? only works on Unix
let cmd = ' -es -u NONE -c "source Xscript" +q; echo $?'
let cmd = ' -es -u NONE -c "source Xscript" +q; echo "result=$?"'
" Need to put this in a script, "catch" isn't found after an unknown
" function.
call writefile(['try', 'call doesnotexist()', 'catch', 'endtry'], 'Xscript')
let a = system(v:progpath . cmd)
call assert_equal('0', a[0])
call assert_match('result=0', a)
call assert_equal(0, v:shell_error)
endif

View File

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