diff src/evalfunc.c @ 11006:b3601a8eb679 v8.0.0392

patch 8.0.0392: GUI test fails with Athena and Motif commit https://github.com/vim/vim/commit/e0c31f6a304496b597a51ce98af419ec815bec74 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 1 15:07:05 2017 +0100 patch 8.0.0392: GUI test fails with Athena and Motif Problem: GUI test fails with Athena and Motif. Solution: Add test_ignore_error(). Use it to ignore the "failed to create input context" error.
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Mar 2017 15:15:05 +0100
parents 835604f3c37a
children fb2bcfa6a8de
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -389,6 +389,7 @@ static void f_test_alloc_fail(typval_T *
 static void f_test_autochdir(typval_T *argvars, typval_T *rettv);
 static void f_test_disable_char_avail(typval_T *argvars, typval_T *rettv);
 static void f_test_garbagecollect_now(typval_T *argvars, typval_T *rettv);
+static void f_test_ignore_error(typval_T *argvars, typval_T *rettv);
 #ifdef FEAT_JOB_CHANNEL
 static void f_test_null_channel(typval_T *argvars, typval_T *rettv);
 #endif
@@ -823,6 +824,7 @@ static struct fst
     {"test_autochdir",	0, 0, f_test_autochdir},
     {"test_disable_char_avail", 1, 1, f_test_disable_char_avail},
     {"test_garbagecollect_now",	0, 0, f_test_garbagecollect_now},
+    {"test_ignore_error",	1, 1, f_test_ignore_error},
 #ifdef FEAT_JOB_CHANNEL
     {"test_null_channel", 0, 0, f_test_null_channel},
 #endif
@@ -12325,6 +12327,15 @@ f_test_garbagecollect_now(typval_T *argv
     garbage_collect(TRUE);
 }
 
+/*
+ * "test_ignore_error()" function
+ */
+    static void
+f_test_ignore_error(typval_T *argvars, typval_T *rettv UNUSED)
+{
+     ignore_error_for_testing(get_tv_string(&argvars[0]));
+}
+
 #ifdef FEAT_JOB_CHANNEL
     static void
 f_test_null_channel(typval_T *argvars UNUSED, typval_T *rettv)