patch 8.2.0522: several errors are not tested for

Problem:    Several errors are not tested for.
Solution:   Add tests. (Yegappan Lakshmanan, closes #5892)
diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim
index 54ba588..af4ce24 100644
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -388,6 +388,11 @@
     call assert_equal('Monospace 10', getfontname())
   endif
 
+  if has('win32')
+    " Invalid font names are accepted in GTK GUI
+    call assert_fails('set guifont=xa1bc23d7f', 'E596:')
+  endif
+
   if has('xfontset')
     let &guifontset = guifontset_saved
   endif
@@ -402,6 +407,8 @@
   CheckFeature xfontset
   let skipped = ''
 
+  call assert_fails('set guifontset=*', 'E597:')
+
   let ctype_saved = v:ctype
 
   " First, since XCreateFontSet(3) is very sensitive to locale, fonts must
@@ -468,6 +475,7 @@
 endfunc
 
 func Test_set_guifontwide()
+  call assert_fails('set guifontwide=*', 'E533:')
   let skipped = ''
 
   if !g:x11_based_gui
@@ -785,6 +793,7 @@
   " It's enough to check the current value since setting 'term' to anything
   " other than builtin_gui makes no sense at all.
   call assert_equal('builtin_gui', &term)
+  call assert_fails('set term=xterm', 'E530:')
 endfunc
 
 func Test_windowid_variable()