Skip to content

Commit a2845b8

Browse files
committed
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Problem: Client-server tests fail when $DISPLAY is not set. Solution: Check for E240 before running the test.
1 parent 6c0c1e8 commit a2845b8

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/testdir/test_clientserver.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ func Test_client_server()
1111
if cmd == ''
1212
return
1313
endif
14+
if has('unix')
15+
try
16+
call remote_send('xxx', '')
17+
catch
18+
if v:exception =~ 'E240:'
19+
" No connection to the X server, give up.
20+
return
21+
endif
22+
" ignore other errors
23+
endtry
24+
endif
1425

1526
let name = 'XVIMTEST'
1627
let cmd .= ' --servername ' . name

src/testdir/test_quotestar.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ func Do_test_quotestar_for_x11()
3939
if cmd == ''
4040
return 'GetVimCommand() failed'
4141
endif
42+
try
43+
call remote_send('xxx', '')
44+
catch
45+
if v:exception =~ 'E240:'
46+
" No connection to the X server, give up.
47+
return
48+
endif
49+
" ignore other errors
50+
endtry
4251

4352
let name = 'XVIMCLIPBOARD'
4453
let cmd .= ' --servername ' . name

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+
507,
767769
/**/
768770
506,
769771
/**/

0 commit comments

Comments
 (0)