From 93f2dc0d034677a47c9ba7032b3537c91a718096 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 12 Jul 2020 10:17:30 -0400 Subject: vim-patch:8.2.0893: assert_equalfile() does not take a third argument Problem: Assert_equalfile() does not take a third argument. Solution: Implement the third argument. (Gary Johnson) https://github.com/vim/vim/commit/fb517bac2384798bb5142ed1f75f965f93984c0a --- src/nvim/eval.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index db9d0d987c..12c904bc1b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -5739,6 +5739,12 @@ int assert_equalfile(typval_T *argvars) } if (IObuff[0] != NUL) { prepare_assert_error(&ga); + if (argvars[2].v_type != VAR_UNKNOWN) { + char *const tofree = encode_tv2echo(&argvars[2], NULL); + ga_concat(&ga, (char_u *)tofree); + xfree(tofree); + ga_concat(&ga, (char_u *)": "); + } ga_concat(&ga, IObuff); assert_error(&ga); ga_clear(&ga); -- cgit