patch 8.1.1826: tests use hand coded feature and option checks

Problem:    Tests use hand coded feature and option checks.
Solution:   Use the commands from check.vim in more tests.
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 6b678fb..ceee044 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 @@
 
 " 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 @@
 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 @@
 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 @@
 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 @@
 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)