aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_textformat.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-17 11:30:32 +0800
committerGitHub <noreply@github.com>2022-07-17 11:30:32 +0800
commit53c398d8f44f1796c216402c953512eb57733529 (patch)
treea4abcbed4256058b40e4dc1badd2f06c22079abf /src/nvim/testdir/test_textformat.vim
parent9f837a5dcf61e0b27778dd7127036e12d694d92c (diff)
parent7c3a87182d471649126c58d999d46abede6f60cd (diff)
downloadrneovim-53c398d8f44f1796c216402c953512eb57733529.tar.gz
rneovim-53c398d8f44f1796c216402c953512eb57733529.tar.bz2
rneovim-53c398d8f44f1796c216402c953512eb57733529.zip
Merge pull request #19402 from zeertzjq/vim-8.2.0655
vim-patch:8.2.{0655,1040}: not enough tests
Diffstat (limited to 'src/nvim/testdir/test_textformat.vim')
-rw-r--r--src/nvim/testdir/test_textformat.vim26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_textformat.vim b/src/nvim/testdir/test_textformat.vim
index f0a0f894c3..35a7887761 100644
--- a/src/nvim/testdir/test_textformat.vim
+++ b/src/nvim/testdir/test_textformat.vim
@@ -1060,7 +1060,7 @@ func Test_tw_2_fo_tm_replace()
endfunc
" Test for 'matchpairs' with multibyte chars
-func Test_mps()
+func Test_mps_multibyte()
new
let t =<< trim END
{
@@ -1084,6 +1084,30 @@ func Test_mps()
bwipe!
endfunc
+" Test for 'matchpairs' in latin1 encoding
+func Test_mps_latin1()
+ new
+ let save_enc = &encoding
+ " set encoding=latin1
+ call setline(1, 'abc(def)ghi')
+ normal %
+ call assert_equal(8, col('.'))
+ normal %
+ call assert_equal(4, col('.'))
+ call cursor(1, 6)
+ normal [(
+ call assert_equal(4, col('.'))
+ normal %
+ call assert_equal(8, col('.'))
+ call cursor(1, 6)
+ normal ])
+ call assert_equal(8, col('.'))
+ normal %
+ call assert_equal(4, col('.'))
+ let &encoding = save_enc
+ close!
+endfunc
+
func Test_empty_matchpairs()
split
set matchpairs= showmatch