patch 8.0.1526: no test using a screen dump yet

Problem:    No test using a screen dump yet.
Solution:   Add a test for C syntax highlighting.  Add helper functions.
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index 8042428..b16fdce 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -178,17 +178,20 @@
 " The Makefile writes it as the first line in the "vimcmd" file.
 func GetVimProg()
   if !filereadable('vimcmd')
-    return ''
+    " Assume the script was sourced instead of running "make".
+    return '../vim'
   endif
   return readfile('vimcmd')[0]
 endfunc
 
 " Get the command to run Vim, with -u NONE and --not-a-term arguments.
 " If there is an argument use it instead of "NONE".
-" Returns an empty string on error.
 func GetVimCommand(...)
   if !filereadable('vimcmd')
-    return ''
+    echo 'Cannot read the "vimcmd" file, falling back to ../vim.'
+    let lines = ['../vim']
+  else
+    let lines = readfile('vimcmd')
   endif
   if a:0 == 0
     let name = 'NONE'
@@ -199,7 +202,6 @@
   " "vimcmd" file, including environment options.
   " Other Makefiles just write the executable in the first line, so fall back
   " to that if there is no second line.
-  let lines = readfile('vimcmd')
   let cmd = get(lines, 1, lines[0])
   let cmd = substitute(cmd, '-u \f\+', '-u ' . name, '')
   if cmd !~ '-u '. name
@@ -210,6 +212,14 @@
   return cmd
 endfunc
 
+" Get the command to run Vim, with --clean.
+func GetVimCommandClean()
+  let cmd = GetVimCommand()
+  let cmd = substitute(cmd, '-u NONE', '--clean', '')
+  let cmd = substitute(cmd, '--not-a-term', '', '')
+  return cmd
+endfunc
+
 " Run Vim, using the "vimcmd" file and "-u NORC".
 " "before" is a list of Vim commands to be executed before loading plugins.
 " "after" is a list of Vim commands to be executed after loading plugins.