aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-05 06:22:37 +0800
committerGitHub <noreply@github.com>2023-05-05 06:22:37 +0800
commitd79e72621226cae91c8d8f6ad23e3c0670e1211c (patch)
tree31fbd4e79d3e3f387282762ab133f0ae8980572d /test
parentf6299e9d6e13935cc67c2fab16c1a5f6dbc515f3 (diff)
downloadrneovim-d79e72621226cae91c8d8f6ad23e3c0670e1211c.tar.gz
rneovim-d79e72621226cae91c8d8f6ad23e3c0670e1211c.tar.bz2
rneovim-d79e72621226cae91c8d8f6ad23e3c0670e1211c.zip
vim-patch:8.2.4397: crash when using many composing characters in error message (#23481)
Problem: Crash when using many composing characters in error message. Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv(). https://github.com/vim/vim/commit/34f8117dec685ace52cd9e578e2729db278163fc Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_assert.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/old/testdir/test_assert.vim b/test/old/testdir/test_assert.vim
index 6bc4deb47b..62b2e5d7ab 100644
--- a/test/old/testdir/test_assert.vim
+++ b/test/old/testdir/test_assert.vim
@@ -53,6 +53,14 @@ func Test_assert_equal()
call assert_equal("\b\e\f\n\t\r\\\x01\x7f", 'x')
call assert_match('Expected ''\\b\\e\\f\\n\\t\\r\\\\\\x01\\x7f'' but got ''x''', v:errors[0])
call remove(v:errors, 0)
+
+ " many composing characters are handled properly
+ call setline(1, ' ')
+ norm 100grƯ€
+ call assert_equal(1, getline(1))
+ call assert_match("Expected 1 but got '.* occurs 100 times]'", v:errors[0])
+ call remove(v:errors, 0)
+ bwipe!
endfunc
func Test_assert_equal_dict()