aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/assert_spec.lua
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-07-12 07:40:55 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-07-19 11:40:34 -0400
commitab69ea26dccf4760a60882059a69b9245f767e2c (patch)
tree2441b50a9bd994a43f6cea40e82773cfc9cc20f0 /test/functional/legacy/assert_spec.lua
parent65793a90d75c59d759b32dde01c0dc6a7fb4186c (diff)
downloadrneovim-ab69ea26dccf4760a60882059a69b9245f767e2c.tar.gz
rneovim-ab69ea26dccf4760a60882059a69b9245f767e2c.tar.bz2
rneovim-ab69ea26dccf4760a60882059a69b9245f767e2c.zip
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. https://github.com/vim/vim/commit/865767126e97d9ac65e052a657b29bbc32dcb512
Diffstat (limited to 'test/functional/legacy/assert_spec.lua')
-rw-r--r--test/functional/legacy/assert_spec.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua
index 3cb5d97869..dd7810bf51 100644
--- a/test/functional/legacy/assert_spec.lua
+++ b/test/functional/legacy/assert_spec.lua
@@ -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}])