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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user