diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-22 05:43:38 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-05-22 06:41:31 +0800 |
commit | c3568b31f423b8af11be155f6fdb7b464a519fd2 (patch) | |
tree | 91d452cc69d98bd7d413073a812a7cf92503eb30 /src | |
parent | a1df7c5771aec0a52ed86bf89277372a1a2e4b37 (diff) | |
download | rneovim-c3568b31f423b8af11be155f6fdb7b464a519fd2.tar.gz rneovim-c3568b31f423b8af11be155f6fdb7b464a519fd2.tar.bz2 rneovim-c3568b31f423b8af11be155f6fdb7b464a519fd2.zip |
vim-patch:8.2.4991: no test for hwat patch 8.1.0535 fixes
Problem: No test for hwat patch 8.1.0535 fixes.
Solution: Add a test. (closes vim/vim#10462)
https://github.com/vim/vim/commit/93c1573dd284dc9cf5ed9265a0143aaf520d2920
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_fold.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 9f5ad53adb..b1d91fd879 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -217,6 +217,26 @@ func Test_update_folds_expr_read() set foldmethod& foldexpr& endfunc +" Test for what patch 8.1.0535 fixes. +func Test_foldexpr_no_interrupt_addsub() + new + func! FoldFunc() + call setpos('.', getcurpos()) + return '=' + endfunc + + set foldmethod=expr + set foldexpr=FoldFunc() + call setline(1, '1.2') + + exe "norm! $\<C-A>" + call assert_equal('1.3', getline(1)) + + bwipe! + delfunc FoldFunc + set foldmethod& foldexpr& +endfunc + func Check_foldlevels(expected) call assert_equal(a:expected, map(range(1, line('$')), 'foldlevel(v:val)')) endfunc |