Skip to content

Commit 11e79bb

Browse files
committed
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.
1 parent 0ea5070 commit 11e79bb

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/testdir/setup.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ endif
88

99
" Only when the +eval feature is present.
1010
if 1
11+
" Make sure the .Xauthority file can be found after changing $HOME.
12+
if $XAUTHORITY == ''
13+
let $XAUTHORITY = $HOME . '/.Xauthority'
14+
endif
15+
1116
" Make sure $HOME does not get read or written.
1217
let $HOME = '/does/not/exist'
1318
endif
14-

src/testdir/test_system.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ endfunction
4949

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

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
701,
767769
/**/
768770
700,
769771
/**/

0 commit comments

Comments
 (0)