summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-08 17:03:21 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-08 17:03:21 +0200
commit11e79bb04ea635d180dd79b1d5cbc755b56e66e1 (patch)
treec73aad78396f094ff3cc59d7261d4e99f59e0b82
parent0ea5070d79c8a13fb2403280a72f968495b0fab7 (diff)
downloadvim-git-11e79bb04ea635d180dd79b1d5cbc755b56e66e1.tar.gz
patch 8.0.0701: system test failing when using X11 forwardingv8.0.0701
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.
-rw-r--r--src/testdir/setup.vim6
-rw-r--r--src/testdir/test_system.vim4
-rw-r--r--src/version.c2
3 files changed, 9 insertions, 3 deletions
diff --git a/src/testdir/setup.vim b/src/testdir/setup.vim
index a02840158..4b6c08963 100644
--- a/src/testdir/setup.vim
+++ b/src/testdir/setup.vim
@@ -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
-
diff --git a/src/testdir/test_system.vim b/src/testdir/test_system.vim
index d6886b0f0..5f766c762 100644
--- a/src/testdir/test_system.vim
+++ b/src/testdir/test_system.vim
@@ -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
diff --git a/src/version.c b/src/version.c
index 7c1fb103a..42fb71da7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 701,
+/**/
700,
/**/
699,