summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_startup.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-07 23:07:07 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-07 23:07:07 +0200
commit8c5a278fc508da6dfe50e69b6ee734451aa4eafb (patch)
tree8a07c54e9ea8667a88f4aa2566e3c3c314727751 /src/testdir/test_startup.vim
parentb59e7357722d977830948572a395f0a175c7ded8 (diff)
patch 8.1.1826: tests use hand coded feature and option checksv8.1.1826
Problem: Tests use hand coded feature and option checks. Solution: Use the commands from check.vim in more tests.
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r--src/testdir/test_startup.vim36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 6b678fb20b..ceee044ca3 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -2,6 +2,7 @@
source shared.vim
source screendump.vim
+source check.vim
" Check that loading startup.vim works.
func Test_startup_script()
@@ -262,10 +263,9 @@ endfunc
" Test the -V[N] argument to set the 'verbose' option to [N]
func Test_V_arg()
- if has('gui_running')
- " Can't catch the output of gvim.
- return
- endif
+ " Can't catch the output of gvim.
+ CheckNotGui
+
let out = system(GetVimCommand() . ' --clean -es -X -V0 -c "set verbose?" -cq')
call assert_equal(" verbose=0\n", out)
@@ -395,10 +395,9 @@ func Test_A_F_H_arg()
endfunc
func Test_invalid_args()
- if !has('unix') || has('gui_running')
- " can't get output of Vim.
- return
- endif
+ " must be able to get the output of Vim.
+ CheckUnix
+ CheckNotGui
for opt in ['-Y', '--does-not-exist']
let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
@@ -599,10 +598,9 @@ func Test_progpath()
endfunc
func Test_silent_ex_mode()
- if !has('unix') || has('gui_running')
- " can't get output of Vim.
- return
- endif
+ " must be able to get the output of Vim.
+ CheckUnix
+ CheckNotGui
" This caused an ml_get error.
let out = system(GetVimCommand() . '-u NONE -es -c''set verbose=1|h|exe "%norm\<c-y>\<c-d>"'' -c cq')
@@ -610,10 +608,9 @@ func Test_silent_ex_mode()
endfunc
func Test_default_term()
- if !has('unix') || has('gui_running')
- " can't get output of Vim.
- return
- endif
+ " must be able to get the output of Vim.
+ CheckUnix
+ CheckNotGui
let save_term = $TERM
let $TERM = 'unknownxxx'
@@ -649,10 +646,9 @@ func Test_zzz_startinsert()
endfunc
func Test_issue_3969()
- if has('gui_running')
- " Can't catch the output of gvim.
- return
- endif
+ " Can't catch the output of gvim.
+ CheckNotGui
+
" Check that message is not truncated.
let out = system(GetVimCommand() . ' -es -X -V1 -c "echon ''hello''" -cq')
call assert_equal('hello', out)