summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_spell.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-07-04 13:37:07 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-04 13:37:07 +0100
commit54e5fed6d27b747ff152cdb6edfb72ff60e70939 (patch)
tree865527f536591729b79b0a0edf3e67dfbcf972df /src/testdir/test_spell.vim
parent288ed23e3929ff55a8ae30db0ba3f57b6f119dc8 (diff)
patch 9.0.0035: spell dump may go beyond end of an arrayv9.0.0035
Problem: Spell dump may go beyond end of an array. Solution: Limit the word length.
Diffstat (limited to 'src/testdir/test_spell.vim')
-rw-r--r--src/testdir/test_spell.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index d3f56d8d14..a291eb5c7a 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -285,6 +285,18 @@ func Test_spellreall()
bwipe!
endfunc
+func Test_spell_dump_word_length()
+ " this was running over MAXWLEN
+ new
+ noremap 0 0a0zW0000000
+ sil! norm 0z=0
+ sil norm 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+ sil! norm 0z=0
+
+ bwipe!
+ nunmap 0
+endfunc
+
" Test spellsuggest({word} [, {max} [, {capital}]])
func Test_spellsuggest()
" Verify suggestions are given even when spell checking is not enabled.