aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Malcomson <hardenedapple@gmail.com>2017-03-23 14:16:21 +0000
committerMatthew Malcomson <hardenedapple@gmail.com>2017-03-23 15:55:57 +0000
commita6c9c91841a9c3a63196ec5b82c09308c8e5b78d (patch)
treee99ba6bd5718105d72ddfb005ada57f52ef32bbc
parent308a953e0b892a0d59467e55227e972dbe51983c (diff)
downloadrneovim-a6c9c91841a9c3a63196ec5b82c09308c8e5b78d.tar.gz
rneovim-a6c9c91841a9c3a63196ec5b82c09308c8e5b78d.tar.bz2
rneovim-a6c9c91841a9c3a63196ec5b82c09308c8e5b78d.zip
vim-patch:8.0.0407 : filtering folds with marker method not tested
Problem: Filtering folds with marker method not tested. Solution: Also set 'foldmethod' to "marker".
-rw-r--r--src/nvim/testdir/test_fold.vim27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim
index de07a05a2c..976c6b5cd1 100644
--- a/src/nvim/testdir/test_fold.vim
+++ b/src/nvim/testdir/test_fold.vim
@@ -120,17 +120,22 @@ func Test_manual_fold_with_filter()
if !executable('cat')
return
endif
- new
- call setline(1, range(1, 20))
- 4,$fold
- %foldopen
- 10,$fold
- %foldopen
- " This filter command should not have an effect
- 1,8! cat
- call feedkeys('5ggzdzMGdd', 'xt')
- call assert_equal(['1', '2', '3', '4', '5', '6', '7', '8', '9'], getline(1, '$'))
- bwipe!
+ for type in ['manual', 'marker']
+ exe 'set foldmethod=' . type
+ new
+ call setline(1, range(1, 20))
+ 4,$fold
+ %foldopen
+ 10,$fold
+ %foldopen
+ " This filter command should not have an effect
+ 1,8! cat
+ call feedkeys('5ggzdzMGdd', 'xt')
+ call assert_equal(['1', '2', '3', '4', '5', '6', '7', '8', '9'], getline(1, '$'))
+
+ bwipe!
+ set foldmethod&
+ endfor
endfunc
func! Test_move_folds_around_manual()