diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-17 09:23:49 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-17 10:03:58 +0800 |
| commit | e53330a603fc95b3b00af98bce56982627851641 (patch) | |
| tree | b3576fe524dadc5bcd0a14601c02437bd27a350e /src/nvim/testdir/test_textformat.vim | |
| parent | 9f837a5dcf61e0b27778dd7127036e12d694d92c (diff) | |
| download | rneovim-e53330a603fc95b3b00af98bce56982627851641.tar.gz rneovim-e53330a603fc95b3b00af98bce56982627851641.tar.bz2 rneovim-e53330a603fc95b3b00af98bce56982627851641.zip | |
vim-patch:8.2.0655: search code not sufficiently tested
Problem: Search code not sufficiently tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5999)
https://github.com/vim/vim/commit/224a5f17c6ec9e98322a4c6792ce4f9bb31a4cce
Cherry-pick test_charsearch.vim change from patch 8.2.0448.
Cherry-pick test_search.vim changes from patch 8.2.0619.
Diffstat (limited to 'src/nvim/testdir/test_textformat.vim')
| -rw-r--r-- | src/nvim/testdir/test_textformat.vim | 26 |
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 |