diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-02 09:28:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-02 09:28:16 +0800 |
| commit | f71d518c90b46dd7c53d151a59ff9a5236589f64 (patch) | |
| tree | 2fa282eec758d1e6b00890994dfebf6776039901 /src/nvim/testdir | |
| parent | 5bd1bdee142b9021c297ba540fd2ee8a0c42bea0 (diff) | |
| parent | d358856a0c78d73f9d850df5f722c5572014e90c (diff) | |
| download | rneovim-f71d518c90b46dd7c53d151a59ff9a5236589f64.tar.gz rneovim-f71d518c90b46dd7c53d151a59ff9a5236589f64.tar.bz2 rneovim-f71d518c90b46dd7c53d151a59ff9a5236589f64.zip | |
Merge pull request #19199 from zeertzjq/vim-9.0.0017
vim-patch:9.0.{0017,0021,0022}: invalid memory access
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_spell.vim | 15 | ||||
| -rw-r--r-- | src/nvim/testdir/test_spell_utf8.vim | 7 | ||||
| -rw-r--r-- | src/nvim/testdir/test_visual.vim | 12 |
3 files changed, 33 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index 215d4387d6..d0895a48b4 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -699,6 +699,21 @@ func Test_spellsuggest_too_deep() bwipe! endfunc +func Test_spell_good_word_invalid() + " This was adding a word with a 0x02 byte, which causes havoc. + enew + norm o0 + sil! norm rzzWs00/ + 2 + sil! norm VzGprzzW + sil! norm z= + + bwipe! + " clear the internal word list + " set enc=latin1 + set enc=utf-8 +endfunc + func LoadAffAndDic(aff_contents, dic_contents) throw 'skipped: Nvim does not support enc=latin1' set enc=latin1 diff --git a/src/nvim/testdir/test_spell_utf8.vim b/src/nvim/testdir/test_spell_utf8.vim index 3c07e0782b..3d240a8f2c 100644 --- a/src/nvim/testdir/test_spell_utf8.vim +++ b/src/nvim/testdir/test_spell_utf8.vim @@ -780,7 +780,12 @@ func Test_no_crash_with_weird_text() END call setline(1, lines) - exe "%norm \<C-v>ez=>\<C-v>wzG" + try + exe "%norm \<C-v>ez=>\<C-v>wzG" + catch /E1280:/ + let caught = 'yes' + endtry + call assert_equal('yes', caught) bwipe! endfunc diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 41c29c5bb0..492750fa66 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1431,5 +1431,17 @@ func Test_visual_paste_clipboard() bwipe! endfunc +func Test_visual_area_adjusted_when_hiding() + " The Visual area ended after the end of the line after :hide + call setline(1, 'xxx') + vsplit Xfile + call setline(1, 'xxxxxxxx') + norm! $o + hid + norm! zW + bwipe! + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |