1
0
forked from aniani/vim

patch 8.1.0819: a failed assert with a long string is hard to read

Problem:    A failed assert with a long string is hard to read.
Solution:   Shorten the assert message.
This commit is contained in:
Bram Moolenaar
2019-01-25 20:48:33 +01:00
parent 240583869a
commit 865767126e
3 changed files with 71 additions and 21 deletions

View File

@@ -31,6 +31,10 @@ func Test_assert_equal()
call assert_equal(1, assert_equal('bar', s))
call assert_match("Expected 'bar' but got 'foo'", v:errors[0])
call remove(v:errors, 0)
call assert_equal('XxxxxxxxxxxxxxxxxxxxxxX', 'XyyyyyyyyyyyyyyyyyyyyyyyyyX')
call assert_match("Expected 'X\\\\\\[x occurs 21 times]X' but got 'X\\\\\\[y occurs 25 times]X'", v:errors[0])
call remove(v:errors, 0)
endfunc
func Test_assert_equalfile()