mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
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.
865767126e
This commit is contained in:
@@ -92,6 +92,11 @@ describe('assert function:', function()
|
||||
call('assert_equal', 'foo', 'bar', 'testing')
|
||||
expected_errors({"testing: Expected 'foo' but got 'bar'"})
|
||||
end)
|
||||
|
||||
it('should shorten a long message', function()
|
||||
call ('assert_equal', 'XxxxxxxxxxxxxxxxxxxxxxX', 'XyyyyyyyyyyyyyyyyyyyyyyyyyX')
|
||||
expected_errors({"Expected 'X\\[x occurs 21 times]X' but got 'X\\[y occurs 25 times]X'"})
|
||||
end)
|
||||
end)
|
||||
|
||||
-- assert_notequal({expected}, {actual}[, {msg}])
|
||||
|
Reference in New Issue
Block a user