diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-13 20:26:20 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-13 20:26:20 +0200 |
commit | 9f0139a2a869b0804e5b91a65e3d5952c9091879 (patch) | |
tree | cc1dbfb2b8c6742dd62f910b455200bb620392fd /src | |
parent | 4f44b886840a90a50575204bc29f72ef309cfaf6 (diff) | |
download | vim-git-9f0139a2a869b0804e5b91a65e3d5952c9091879.tar.gz |
patch 8.0.0933: terminal test tries to start GUI when it's not possiblev8.0.0933
Problem: Terminal test tries to start GUI when it's not possible.
Solution: Check if the GUI can run. (James McCoy, closes #1971)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/shared.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_gui.vim | 3 | ||||
-rw-r--r-- | src/testdir/test_gui_init.vim | 3 | ||||
-rw-r--r-- | src/testdir/test_terminal.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
5 files changed, 11 insertions, 3 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index 790b07b56..a305c90cb 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -215,3 +215,7 @@ func RunVimPiped(before, after, arguments, pipecmd) endif return 1 endfunc + +func CanRunGui() + return has('gui') && ($DISPLAY != "" || has('gui_running')) +endfunc diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim index f044f3a7b..427bab702 100644 --- a/src/testdir/test_gui.vim +++ b/src/testdir/test_gui.vim @@ -1,6 +1,7 @@ " Tests specifically for the GUI -if !has('gui') || ($DISPLAY == "" && !has('gui_running')) +source shared.vim +if !CanRunGui() finish endif diff --git a/src/testdir/test_gui_init.vim b/src/testdir/test_gui_init.vim index 21e5bb6a7..661bf0ce6 100644 --- a/src/testdir/test_gui_init.vim +++ b/src/testdir/test_gui_init.vim @@ -1,7 +1,8 @@ " Tests specifically for the GUI features/options that need to be set up at " startup to take effect at runtime. -if !has('gui') || ($DISPLAY == "" && !has('gui_running')) +source shared.vim +if !CanRunGui() finish endif diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 42783512f..605292e6a 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -417,7 +417,7 @@ endfunc " must be last, we can't go back from GUI to terminal func Test_zz_terminal_in_gui() - if !has('gui') + if !CanRunGui() return endif gui -f diff --git a/src/version.c b/src/version.c index 850be59f4..ab8c3149f 100644 --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 933, +/**/ 932, /**/ 931, |