diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-06 23:07:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-06 23:07:57 +0800 |
| commit | de500095b1adc675999315e70307b3425dca089c (patch) | |
| tree | 154dc7a54ab85cbdb8581e22a693de3b2333500d /src/nvim/testdir/test_textformat.vim | |
| parent | 728c69bc8d52a3f2281a76e4142b2d766dc45da0 (diff) | |
| download | rneovim-de500095b1adc675999315e70307b3425dca089c.tar.gz rneovim-de500095b1adc675999315e70307b3425dca089c.tar.bz2 rneovim-de500095b1adc675999315e70307b3425dca089c.zip | |
vim-patch:8.2.2592: code coverage could be improved (#20969)
Problem: Code coverage could be improved.
Solution: Add a few more tests. (Dominique Pellé, closes vim/vim#7957)
https://github.com/vim/vim/commit/6fd367a97c8653a2d734a38252c7d68d4b2ebaa7
Test case in test_viminfo.vim is applicable.
Diffstat (limited to 'src/nvim/testdir/test_textformat.vim')
| -rw-r--r-- | src/nvim/testdir/test_textformat.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_textformat.vim b/src/nvim/testdir/test_textformat.vim index 3bce2eb24d..7a13de12f4 100644 --- a/src/nvim/testdir/test_textformat.vim +++ b/src/nvim/testdir/test_textformat.vim @@ -1044,6 +1044,22 @@ func Test_empty_matchpairs() bwipe! endfunc +func Test_mps_error() + let encoding_save = &encoding + + " for e in ['utf-8', 'latin1'] + for e in ['utf-8'] + exe 'set encoding=' .. e + + call assert_fails('set mps=<:', 'E474:', e) + call assert_fails('set mps=:>', 'E474:', e) + call assert_fails('set mps=<>', 'E474:', e) + call assert_fails('set mps=<:>_', 'E474:', e) + endfor + + let &encoding = encoding_save +endfunc + " Test for ra on multi-byte characters func Test_ra_multibyte() new |