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_options.vim b/src/testdir/test_options.vim
index f111894..ef3ae1a 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -195,6 +195,7 @@
   new
   call feedkeys("i\<C-N>\<Esc>", 'xt')
   bwipe!
+  call assert_fails('set complete=ix', 'E535:')
   set complete&
 endfun
 
@@ -381,6 +382,10 @@
 
   set ttytype&
   call assert_equal(&ttytype, &term)
+
+  if has('gui') && !has('gui_running')
+    call assert_fails('set term=gui', 'E531:')
+  endif
 endfunc
 
 func Test_set_all()