diff options
author | ckelsel <ckelsel@hotmail.com> | 2017-09-11 19:14:41 +0800 |
---|---|---|
committer | ckelsel <ckelsel@hotmail.com> | 2017-09-11 19:14:41 +0800 |
commit | 5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82 (patch) | |
tree | 9f9d762925f8457632ec80cc2082d0f0516a300b /src/nvim/eval.c | |
parent | af2dd6827299070d81218e9ba54646bfaf53607c (diff) | |
parent | f51a397010dcf4a8308c3b0249810696375b82b2 (diff) | |
download | rneovim-5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82.tar.gz rneovim-5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82.tar.bz2 rneovim-5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d6ee13857a..5ee91d417a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6747,6 +6747,8 @@ static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv, } else { if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH) { ga_concat(gap, (char_u *)"Pattern "); + } else if (atype == ASSERT_NOTEQUAL) { + ga_concat(gap, (char_u *)"Expected not equal to "); } else { ga_concat(gap, (char_u *)"Expected "); } @@ -6757,18 +6759,18 @@ static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv, } else { ga_concat(gap, exp_str); } - tofree = (char_u *)encode_tv2string(got_tv, NULL); - if (atype == ASSERT_MATCH) { - ga_concat(gap, (char_u *)" does not match "); - } else if (atype == ASSERT_NOTMATCH) { - ga_concat(gap, (char_u *)" does match "); - } else if (atype == ASSERT_NOTEQUAL) { - ga_concat(gap, (char_u *)" differs from "); - } else { - ga_concat(gap, (char_u *)" but got "); + if (atype != ASSERT_NOTEQUAL) { + if (atype == ASSERT_MATCH) { + ga_concat(gap, (char_u *)" does not match "); + } else if (atype == ASSERT_NOTMATCH) { + ga_concat(gap, (char_u *)" does match "); + } else { + ga_concat(gap, (char_u *)" but got "); + } + tofree = (char_u *)encode_tv2string(got_tv, NULL); + ga_concat(gap, tofree); + xfree(tofree); } - ga_concat(gap, tofree); - xfree(tofree); } } |