diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim
index 6c9722dac..c18561e5d 100644
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -87,8 +87,10 @@ func Test_quoteplus()
     let test_response = 'Yes, I can.'
     let vim_exe = exepath(v:progpath)
     let testee = 'VIMRUNTIME=' . $VIMRUNTIME . '; export VIMRUNTIME;'
-          \ . vim_exe . ' -f -g -u NONE -U NONE --noplugin -c ''%s'''
-    let cmd = 'call feedkeys("'
+          \ . vim_exe . ' -f -u NONE -U NONE --noplugin --not-a-term -c ''%s'''
+    let cmd = 'call test_ignore_error("E285") | '
+          \ . 'gui -f | '
+          \ . 'call feedkeys("'
           \ . '\"+p'
           \ . ':s/' . test_call . '/' . test_response . '/\<CR>'
           \ . '\"+yis'
diff --git a/src/testdir/test_gui_init.vim b/src/testdir/test_gui_init.vim
index a0922990e..b64176ef4 100644
--- a/src/testdir/test_gui_init.vim
+++ b/src/testdir/test_gui_init.vim
@@ -15,6 +15,8 @@ func TearDown()
   call GUITearDownCommon()
 endfunc
 
+" Ignore the "failed to create input context" error.
+call test_ignore_error('E285')
 " Make sure that the tests will be done with the GUI activated.
 gui -f
 
