summaryrefslogtreecommitdiff
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-18 19:42:22 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-18 19:42:22 +0100
commit42205551b140bee8b419b24abe210f56bb80b35e (patch)
treeeb4b9fe95bd66ccb9c65e01a3bbc70a3cc026eed /src/evalfunc.c
parent7a43cb9cb5909634469b0a3e865747f10ea38e9b (diff)
downloadvim-42205551b140bee8b419b24abe210f56bb80b35e.zip
patch 8.0.0477: the client-server test may hang when failing
Problem: The client-server test may hang when failing. Solution: Set a timer. Add assert_report()
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index bee58eee1..a00c75313 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -52,6 +52,7 @@ static void f_assert_inrange(typval_T *argvars, typval_T *rettv);
static void f_assert_match(typval_T *argvars, typval_T *rettv);
static void f_assert_notequal(typval_T *argvars, typval_T *rettv);
static void f_assert_notmatch(typval_T *argvars, typval_T *rettv);
+static void f_assert_report(typval_T *argvars, typval_T *rettv);
static void f_assert_true(typval_T *argvars, typval_T *rettv);
#ifdef FEAT_FLOAT
static void f_asin(typval_T *argvars, typval_T *rettv);
@@ -483,6 +484,7 @@ static struct fst
{"assert_match", 2, 3, f_assert_match},
{"assert_notequal", 2, 3, f_assert_notequal},
{"assert_notmatch", 2, 3, f_assert_notmatch},
+ {"assert_report", 1, 1, f_assert_report},
{"assert_true", 1, 2, f_assert_true},
#ifdef FEAT_FLOAT
{"atan", 1, 1, f_atan},
@@ -1314,6 +1316,15 @@ f_assert_notmatch(typval_T *argvars, typval_T *rettv UNUSED)
}
/*
+ * "assert_report(msg)" function
+ */
+ static void
+f_assert_report(typval_T *argvars, typval_T *rettv UNUSED)
+{
+ assert_report(argvars);
+}
+
+/*
* "assert_true(actual[, msg])" function
*/
static void